touch: avoid calling is_touch_available too early (#289)

## Link to GitHub Issue, if one exists
Fixes #120 

## Description of change
Don't call `is_touch_available` in launcher before RawInput stack is
initialized. This causes us to incorrectly fall back to the Win7/Win8
touch handler.

The desired behavior is to use rawinput touch by default for all games,
unless overridden by the user via `-wintouch`.

Add a bunch of logging so we can spot who's calling
`is_touch_available`.

As a side effect, a handful of games that previously used Win7/8 touch
will now use RawInput touch instead. If this causes any issues, they can
turn `-wintouch` on to force Win7/8 touch logic again.

## Compiling
👍 

## Testing
Test:

* RB
* -wintouch
* TDJ, UFC subscreen and native touch
* overlay, especially in multi-mon
This commit is contained in:
bicarus-dev
2025-04-04 21:31:18 -07:00
committed by GitHub
parent bd6c8d3f3c
commit ae06652148
9 changed files with 46 additions and 51 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ public:
touch_attach_dx_hook();
// cursor
if (!is_touch_available()) {
if (!is_touch_available("TwTouchDevice::open")) {
ShowCursor(true);
}
}