mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
add back some hotkeys.
remove some legacy cruft from NDS.cpp.
This commit is contained in:
18
src/NDS.cpp
18
src/NDS.cpp
@ -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)
|
||||
|
Reference in New Issue
Block a user