Browse Source

Implement GetAsyncKeyState (enables two debug features)

- When started with -^ you can scroll the screen by holding shift and
moving the mouse.
- Holding menu will disable transparency.
pull/340/head
Anders Jenbo 7 years ago
parent
commit
5eacf0ed8e
  1. 12
      SourceX/miniwin/misc_msg.cpp

12
SourceX/miniwin/misc_msg.cpp

@ -365,8 +365,16 @@ WINBOOL TranslateMessage(const MSG *lpMsg)
SHORT GetAsyncKeyState(int vKey)
{
DUMMY_ONCE();
// TODO: Not handled yet.
const Uint8 *state = SDL_GetKeyboardState(NULL);
if (vKey == DVL_VK_SHIFT) {
if (state[SDL_SCANCODE_LSHIFT] || state[SDL_SCANCODE_RSHIFT]) {
return 0x8000;
}
}
if (vKey == DVL_VK_MENU && state[SDL_SCANCODE_M]) {
return 0x8000;
}
return 0;
}

Loading…
Cancel
Save