TIC-80 mouse inputs not working as expected
Randomno opened this issue · 7 comments
2 TIC-80 programs to test this if necessary
Thanks, this makes the mouse a lot more usable.
There still seem to be some issues with relative mouse, but I'm not sure what exactly. Trying to play Portal 3D, the menu options aren't highlighted correctly. In-game, to play as intended you have to hold down the toggle hotkey the entire time.
So it's probably functional enough to make a TAS, just not very friendly for normal play.
From what I can tell the "toggle" in TIC80 code is only present when it's actually set. It might be that the frontend is supposed to implement the stickiness of the toggle here itself.
Tbh I don't understand why this is even a hotkey, seems like the game should be controlling the mouse mode rather than the emulator. But I don't understand most of this anyway.
With this code, pressing A swaps to relative mode. Coords are 0,0 when mouse is stationary.
Seems like the toggle is intended as a flag to the game that the mouse are relative coordinates rather than absolute coordinates, and is more a frontend detail if anything. It might make more sense to actually have this as a sync setting perhaps.
Actually, nevermind, I read more of the code, it seems like it is indeed a flag by the game whether it wants relative or absolute inputs, and the frontend should be respecting that (although that ends up being tricky for us due to how the input system works...)
Latest commits should hopefully make mouse input correct (at least it seems to match the reference implementation frontend).