mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
drop Host_GetKeyState
This function isn't used any more and it shouldn't be used at all as it generates a sync request to the x11 server. So it has to wait for a complete round trip time.
This commit is contained in:
@ -620,25 +620,6 @@ void Host_UpdateBreakPointView()
|
||||
}
|
||||
}
|
||||
|
||||
bool Host_GetKeyState(int keycode)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return (0 != GetAsyncKeyState(keycode));
|
||||
#elif defined __WXGTK__
|
||||
std::unique_lock<std::recursive_mutex> lk(main_frame->keystate_lock, std::try_to_lock);
|
||||
if (!lk.owns_lock())
|
||||
return false;
|
||||
|
||||
bool key_pressed;
|
||||
if (!wxIsMainThread()) wxMutexGuiEnter();
|
||||
key_pressed = wxGetKeyState(wxKeyCode(keycode));
|
||||
if (!wxIsMainThread()) wxMutexGuiLeave();
|
||||
return key_pressed;
|
||||
#else
|
||||
return wxGetKeyState(wxKeyCode(keycode));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
|
||||
{
|
||||
main_frame->GetRenderWindowSize(x, y, width, height);
|
||||
|
Reference in New Issue
Block a user