Summary
(follow up on a question in the scripting channel by tortoiseplaysvr)
Sticky input (used by the virtual pad, joypad.setanalog etc.) is applied with the XorAdapter, which is forcing the axis to its neutral value if both the regular input and the sticky input are non-neutral. Mouse inputs are basically never neutral unless the mouse is very precisely positioned at the center point, so it's effective unusable. This particularly affects NDS touch input (which has mouse bindings by default), and potentially other systems (e.g. DOSBox). The only workaround seems to be unbinding the mouse.
Not sure what to do about this, maybe it's just "working as intended", but it seems very inconvenient and unintuitive. At least Lua/tools should be able to force specific input.
Repro
- Load an NDS rom (with default controller bindings)
- Load
NDS/StylusInputDisplay.lua
- Enter
joypad.setanalog({["Touch X"]=10, ["Touch Y"]=10}) in the Lua console
- Crosshair will be stuck in the center of the bottom screen, unless the mouse is positioned exactly over the X/Y center of the touchscreen
Host env.
Summary
(follow up on a question in the scripting channel by tortoiseplaysvr)
Sticky input (used by the virtual pad,
joypad.setanalogetc.) is applied with theXorAdapter, which is forcing the axis to its neutral value if both the regular input and the sticky input are non-neutral. Mouse inputs are basically never neutral unless the mouse is very precisely positioned at the center point, so it's effective unusable. This particularly affects NDS touch input (which has mouse bindings by default), and potentially other systems (e.g. DOSBox). The only workaround seems to be unbinding the mouse.Not sure what to do about this, maybe it's just "working as intended", but it seems very inconvenient and unintuitive. At least Lua/tools should be able to force specific input.
Repro
NDS/StylusInputDisplay.luajoypad.setanalog({["Touch X"]=10, ["Touch Y"]=10})in the Lua consoleHost env.