Move async checking for pressed keys into Host_GetKeyState()

and use wxGetKeyState on platforms other than Windows.

I am not sure if wxGetKeyState is unreliable on Windows or if
the use of GetAsyncKeyState() is simply historical, but for now
I've left the Windows call in there just in case.

This does mean that Host_GetKeyState() is currently only valid
for the small set of keycodes that overlap between wx and Win32,
one of which is VK_TAB/WXK_TAB.

Anyway, please test wxGetKeyState on Windows and remove the
ifdef if it works, so we can extend it to the remaining hotkeys.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6988 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-01-30 16:40:38 +00:00
parent 864d24a86e
commit db1765c425
8 changed files with 26 additions and 60 deletions

View File

@ -564,11 +564,14 @@ void Host_UpdateBreakPointView()
}
}
void Host_UpdateMemoryView()
{}
void Host_SetDebugMode(bool)
{}
bool Host_GetKeyState(int keycode)
{
#ifdef _WIN32
return GetAsyncKeyState(keycode);
#else
return wxGetKeyState(wxKeyCode(keycode));
#endif
}
void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
{