spice2x / spice2x.github.io

🌶️ spice2x is a spicier fork of SpiceTools with hundreds of bug fixes and new features 🌶️
https://spice2x.github.io/
GNU General Public License v3.0
116 stars 2 forks source link

wintouchemu: stops working when overlay is shown + touch screen is connected #197

Closed sp2xdev closed 4 months ago

sp2xdev commented 4 months ago

Game and version

beatstream, nostalgia, probably any others that use wintouchemu

Version of spice2x

Present builds as old as spicetools-22-10-21 so it's not new in spice2x.

Laptop

n/a

Attached log.txt file, if available

n/a

Describe the issue

This only happens when you have a touch screen connected, and you are trying to use mouse for touch emulation.

Connect a touch screen Launch game that uses wintouchemu (e.g., beatstream, nostalgia) Enter touch screen test menu Verify that mouse click result in touches Open up overlay, click on overlay, close overlay Mouse clicks stops responding to touch screen Touching the touch screen also stops working

Workaround: use "disable overlay" option, or disconnect touch screen.

sp2xdev commented 4 months ago

Probably a bug in overlay code like ImGui_ImplSpice_UpdateMousePos which deals with touch screens, or maybe some weird issue where spicetouch window loses focus

sp2xdev commented 4 months ago

Related: https://github.com/spice2x/spice2x.github.io/issues/120

This only seems to happen if win7/win8 touch handler is in use (nost/bs...), not raw touch input (iidx/sdvx). SpiceTouchWndProc sometimes ends up not calling TOUCH_HANDLER->handle_message even though the overlay is hidden, because ImGui::GetIO().WantCaptureMouse is set.