mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-05 08:10:40 -07:00
touch: inject touches from spiceapi to native touch hooks (#824)
## Link to GitHub Issue or related Pull Request, if one exists Fixes #814 ## Description of change Touches via the API wasn't being delivered to native touch hook; implement this, which closes the last gap we have vs. wintouchemu. While we're here, implement popn subscreen support for companion as well. ## Testing Tested for iidx/sdvx/popn
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
namespace nativetouch {
|
||||
|
||||
static decltype(GetTouchInputInfo) *GetTouchInputInfo_orig = nullptr;
|
||||
static bool native_touch_hooked = false;
|
||||
static bool native_display_initialized = false;
|
||||
static DWORD native_display_orientation = DMDO_DEFAULT;
|
||||
static long native_display_size_x = 1920L;
|
||||
@@ -157,9 +158,15 @@ namespace nativetouch {
|
||||
return result;
|
||||
}
|
||||
|
||||
bool is_hooked() {
|
||||
return native_touch_hooked;
|
||||
}
|
||||
|
||||
void hook(HMODULE module) {
|
||||
inject::hook(module);
|
||||
|
||||
native_touch_hooked = true;
|
||||
|
||||
GetTouchInputInfo_orig = detour::iat_try("GetTouchInputInfo", GetTouchInputInfoHook, module);
|
||||
if (GetTouchInputInfo_orig != nullptr) {
|
||||
log_misc("touch::native", "GetTouchInputInfo hooked");
|
||||
|
||||
Reference in New Issue
Block a user