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:
degasus 2014-02-16 23:22:11 +01:00
parent 30586f4d29
commit f254fdfd96
4 changed files with 0 additions and 30 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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;

View File

@ -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;