do touchscreen input more properly

This commit is contained in:
Arisotura
2024-10-31 22:10:25 +01:00
parent 1b8daa0465
commit f3bd58f75e
4 changed files with 34 additions and 14 deletions

View File

@ -74,6 +74,10 @@ void EmuInstance::inputInit()
hotkeyMask = 0;
lastHotkeyMask = 0;
isTouching = false;
touchX = 0;
touchY = 0;
joystick = nullptr;
controller = nullptr;
hasRumble = false;
@ -353,3 +357,15 @@ void EmuInstance::inputProcess()
hotkeyRelease = lastHotkeyMask & ~hotkeyMask;
lastHotkeyMask = hotkeyMask;
}
void EmuInstance::touchScreen(int x, int y)
{
touchX = x;
touchY = y;
isTouching = true;
}
void EmuInstance::releaseScreen()
{
isTouching = false;
}