mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
nost: move nostalgia from wintouchemu to native touch hook (#827)
## Link to GitHub Issue or related Pull Request, if one exists #814 ## Description of change Switch over Nostalgia from wintouchemu to native touch hook. Nostalgia has some strict timing requirements (touches must be updated on every acio poll) so this takes a slightly different path to maintain mouse holds. Only a handful of consumers of wintouchemu remain: 1. beatstream - but it's off by default, only enabled as errata for buggy touchscreens, or if the user forces it on (for Show Cursor) 2. gitadora single-window overlay - this is just for mouse so not a big deal. 3. MFC HG mode - not a priority to fix. ## Testing Tested full screen and windowed mode with touch / mouse / poke.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "inject.h"
|
||||
#include "inject_internal.h"
|
||||
#include "settings.h"
|
||||
#include "transform.h"
|
||||
|
||||
#include "util/logging.h"
|
||||
@@ -38,10 +39,10 @@ namespace nativetouch::inject {
|
||||
|
||||
// synthetic touches preempt the mouse and keep it disabled until release or timeout
|
||||
static void begin_synthetic_contact(HWND window, POINT position, bool screen_space) {
|
||||
// dedicated TDJ injects into the physical subscreen, so map Windows'
|
||||
// returned coordinates back into the game's touch coordinate space
|
||||
// remember when Windows-returned coordinates must map back into game space
|
||||
const auto transform_returned_coordinates =
|
||||
transform::is_tdj_dedicated_subscreen(window);
|
||||
transform::is_tdj_dedicated_subscreen(window) ||
|
||||
settings::SYNTHETIC_TOUCH_USES_CLIENT_COORDINATES;
|
||||
if (!screen_space && !transform::game_to_screen(window, &position)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user