add back some hotkeys.

remove some legacy cruft from NDS.cpp.
This commit is contained in:
Arisotura
2020-05-19 22:37:48 +02:00
parent b262313816
commit 95f9698077
5 changed files with 40 additions and 38 deletions

View File

@ -951,23 +951,15 @@ void CancelEvent(u32 id)
}
void PressKey(u32 key)
{
KeyInput &= ~(1 << key);
}
void ReleaseKey(u32 key)
{
KeyInput |= (1 << key);
}
void TouchScreen(u16 x, u16 y)
{
KeyInput &= ~(1<<22);
SPI_TSC::SetTouchCoords(x, y);
}
void ReleaseScreen()
{
KeyInput |= (1<<22);
SPI_TSC::SetTouchCoords(0x000, 0xFFF);
}
@ -981,6 +973,12 @@ void SetKeyMask(u32 mask)
KeyInput |= key_lo | (key_hi << 16);
}
bool IsLidClosed()
{
if (KeyInput & (1<<23)) return true;
return false;
}
void SetLidClosed(bool closed)
{
if (closed)