mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-05 00:00:42 -07:00
touch: inject mouse and poke into native touch modes (#815)
## Link to GitHub Issue or related Pull Request, if one exists Part 1 of many fixes for #814. ## Description of change For the native touch hook - add code to inject synthetic touches using Windows API (`InjectTouchInput`). Note that this is Windows 8+ only, but we can make an assumption that we are running on Win10+ for these games (TDJ/UFC/High Cheers) since the cabs assume Win10. Detect mouse events and allow IIDX poke to call into this to inject synthetic touches. Also, update the nativetouchhook to independently calculate window size and rotation, instead of relying on rawinput layer. ## Testing Tested to work with native touch option on IIDX, SDVX, POPN, all full screen / windowed / sub on/off combinations. Edge cases: * sdvx main monitor rotated 270 deg * touch invert option * windowed mode resize / moved All seem to work.
This commit is contained in:
@@ -15,8 +15,6 @@ namespace overlay::windows {
|
||||
this->disabled_message = "Close this overlay and use the second window. (try ALT+TAB)";
|
||||
} else if (games::iidx::IIDX_TDJ_MONITOR_WARNING) {
|
||||
this->disabled_message = "TDJ mode subscreen overlay is not compatible with -dxmainadapter option; use -mainmonitor instead";
|
||||
} else if (games::iidx::NATIVE_TOUCH) {
|
||||
this->disabled_message = "Overlay disabled by user (-iidxnativetouch option is on, used for real touch screens)";
|
||||
}
|
||||
|
||||
float size = 0.5f;
|
||||
|
||||
@@ -15,8 +15,6 @@ namespace overlay::windows {
|
||||
this->disabled_message = "Game did not launch as Pikapika Pop-kun (invalid <spec>)!";
|
||||
} else if (games::popn::SHOW_PIKA_MONITOR_WARNING) {
|
||||
this->disabled_message = "Subscreen overlay is not compatible with -dxmainadapter option, use -mainmonitor instead";
|
||||
} else if (games::popn::NATIVE_TOUCH) {
|
||||
this->disabled_message = "Overlay disabled by user (-popnnativetouch option is on, used for real touch screens)";
|
||||
} else if (GRAPHICS_WINDOWED && !GRAPHICS_PREVENT_SECONDARY_WINDOWS) {
|
||||
this->disabled_message = "Subscren overlay was not enabled in spicecfg. Use the second window (ALT+TAB).";
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ namespace overlay::windows {
|
||||
this->disabled_message = "Valkyrie Model mode is not enabled!";
|
||||
} else if (games::sdvx::SHOW_VM_MONITOR_WARNING) {
|
||||
this->disabled_message = "VM mode subscreen overlay is not compatible with -dxmainadapter option, use -mainmonitor instead";
|
||||
} else if (games::sdvx::NATIVETOUCH) {
|
||||
this->disabled_message = "Overlay disabled by user (-sdvxnativetouch option is on, used for real touch screens)";
|
||||
} else if (GRAPHICS_WINDOWED) {
|
||||
if (GRAPHICS_PREVENT_SECONDARY_WINDOWS) {
|
||||
this->disabled_message = "Subscreen has been disabled by the user (-sdvxnosub).";
|
||||
|
||||
Reference in New Issue
Block a user