mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 07:39:56 -06:00
do touchscreen input more properly
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user