diff --git a/src/spice2x/touch/native/inject_mouse.cpp b/src/spice2x/touch/native/inject_mouse.cpp index 2d3d81f3..a2ac214d 100644 --- a/src/spice2x/touch/native/inject_mouse.cpp +++ b/src/spice2x/touch/native/inject_mouse.cpp @@ -7,6 +7,7 @@ #include "settings.h" #include "transform.h" +#include "hooks/graphics/graphics.h" #include "touch/touch.h" #include "util/logging.h" @@ -141,6 +142,13 @@ namespace nativetouch::inject { end_mouse_contact(window); } + // SDVX accepts both mouse and touch on its windowed subscreen, causing duplicate input. + if (GRAPHICS_WINDOWED && + window == SDVX_SUBSCREEN_WINDOW && + message >= WM_MOUSEFIRST && message <= WM_MOUSELAST) { + return true; + } + return false; } }