mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
iidx: workaround for touch monitors that report contact area (#462)
## Link to GitHub Issue, if one exists n/a ## Description of change When touch monitors send touch area size information (`TOUCHEVENTFMASK_CONTACTAREA` flag and `cxContact` / `cyContact` fields of `TOUCHINPUT` struct) from `GetTouchInputInfo`, IIDX gets confused and does some unexpected things when interacting with the subscreen. As a workaround, hook `GetTouchInputInfo` and clear out the flag & values. This is only done for IIDX AND when -iidxnativetouch is on. ## Testing Tested on a Dell touch monitor, simulating "bad" values.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "hooks/sleephook.h"
|
||||
#include "launcher/options.h"
|
||||
#include "touch/touch.h"
|
||||
#include "misc/nativetouchhook.h"
|
||||
#include "misc/wintouchemu.h"
|
||||
#include "misc/eamuse.h"
|
||||
#include "util/detour.h"
|
||||
@@ -332,7 +333,9 @@ namespace games::iidx {
|
||||
// need to hook `avs2-core.dll` so AVS win32fs operations go through rom hook
|
||||
devicehook_init(avs::core::DLL_INSTANCE);
|
||||
|
||||
if (!NATIVE_TOUCH) {
|
||||
if (NATIVE_TOUCH) {
|
||||
nativetouchhook::hook(avs::game::DLL_INSTANCE);
|
||||
} else {
|
||||
wintouchemu::FORCE = true;
|
||||
wintouchemu::INJECT_MOUSE_AS_WM_TOUCH = true;
|
||||
wintouchemu::hook_title_ends("beatmania IIDX", "main", avs::game::DLL_INSTANCE);
|
||||
|
||||
Reference in New Issue
Block a user