Files
spice2x.github.io/src/spice2x/rawinput/touch.h
T
bicarus 954e6022d9 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.
2026-02-27 14:22:56 -08:00

27 lines
632 B
C++

#pragma once
#include "device.h"
#include "rawinput.h"
namespace rawinput::touch {
// settings
extern bool DISABLED;
extern bool INVERTED;
// global state
extern DWORD DISPLAY_ORIENTATION;
extern long DISPLAY_SIZE_X;
extern long DISPLAY_SIZE_Y;
extern bool DISPLAY_INITIALIZED;
bool is_touchscreen(Device *device);
void enable(Device *device);
void disable(Device *device);
void update_input(Device *device);
void update_timeouts(Device *device);
void update_timeouts(RawInputManager *manager);
bool is_enabled(RawInputManager *manager);
void display_update();
}