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:
parent
30586f4d29
commit
f254fdfd96
|
@ -25,7 +25,6 @@
|
|||
|
||||
bool Host_RendererHasFocus();
|
||||
void Host_ConnectWiimote(int wm_idx, bool connect);
|
||||
bool Host_GetKeyState(int keycode);
|
||||
void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height);
|
||||
void Host_Message(int Id);
|
||||
void Host_NotifyMapLoaded();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -85,11 +85,6 @@ void Host_UpdateMainFrame()
|
|||
|
||||
void Host_UpdateBreakPointView(){}
|
||||
|
||||
bool Host_GetKeyState(int keycode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
|
||||
{
|
||||
x = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos;
|
||||
|
|
|
@ -79,11 +79,6 @@ void Host_UpdateMainFrame()
|
|||
|
||||
void Host_UpdateBreakPointView(){}
|
||||
|
||||
bool Host_GetKeyState(int keycode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
|
||||
{
|
||||
x = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos;
|
||||
|
|
Loading…
Reference in New Issue