add touchscreen input

This commit is contained in:
Arisotura
2023-03-27 21:01:05 +02:00
parent 2d131dd755
commit b59de12ce4
4 changed files with 46 additions and 8 deletions

View File

@ -36,6 +36,9 @@ u32 HotkeyPress, HotkeyRelease;
u32 InputMask;
bool Touching;
int TouchX, TouchY;
void Init()
{
@ -48,6 +51,10 @@ void Init()
ExtHotkeyMask = 0;
HotkeyMask = 0;
LastHotkeyMask = 0;
Touching = false;
TouchX = 0;
TouchY = 0;
}
@ -190,6 +197,18 @@ void ExtHotkeyPress(int id)
ExtHotkeyMask |= (1<<id);
}
void TouchScreen(int x, int y)
{
TouchX = x;
TouchY = y;
Touching = true;
}
void ReleaseScreen()
{
Touching = false;
}
void Process()
{
SDL_JoystickUpdate();