sdvx, touch: hook Windows touch API when main monitor is rotated 270 degrees (portrait flipped) (#558)

## Link to GitHub Issue, if one exists
n/a

## Description of change
Game expects primary monitor to be in 90 deg rotation, and does the
touch calculation accordingly.

If the user does 270 deg rotation ("portrait, flipped") then the game's
touch calculation is flipped upside down. Detect this and provide the
fixed up values in the touch hook.

## Testing
Tested with SDVX in 90 deg, 270 deg rotation, and 1080p, forced 1440p.
This commit is contained in:
bicarus
2026-02-27 14:22:56 -08:00
committed by GitHub
parent 955c50a9f3
commit 954e6022d9
4 changed files with 45 additions and 9 deletions
+4 -4
View File
@@ -26,10 +26,10 @@ namespace rawinput::touch {
bool INVERTED = false;
// state
static bool DISPLAY_INITIALIZED = false;
static DWORD DISPLAY_ORIENTATION = DMDO_DEFAULT;
static long DISPLAY_SIZE_X = 1920L;
static long DISPLAY_SIZE_Y = 1080L;
DWORD DISPLAY_ORIENTATION = DMDO_DEFAULT;
long DISPLAY_SIZE_X = 1920L;
long DISPLAY_SIZE_Y = 1080L;
bool DISPLAY_INITIALIZED = false;
bool is_touchscreen(Device *device) {