WWKeyboardClass::Down now goes through the SDL system for mouse up and down, needs work for other keys.

This commit is contained in:
Justin Marshall
2020-06-25 17:24:06 -07:00
parent c7e4870048
commit 012a5c2d60
4 changed files with 14 additions and 6 deletions
+8
View File
@@ -364,6 +364,14 @@ char WWKeyboardClass::To_ASCII(unsigned short key)
*=============================================================================================*/
bool WWKeyboardClass::Down(unsigned short key)
{
if (key == KN_LMOUSE) {
return g_globalKeyFlags & GadgetClass::LEFTPRESS;
}
if (key == KN_RMOUSE) {
return g_globalKeyFlags & GadgetClass::RIGHTPRESS;
}
return(GetAsyncKeyState(key & 0xFF) == 0 ? false : true);
}