Increased the performance of the hotkey code by:

* Halving the number of hotkeys checked for (there were extra for future use)
* Gets the controller status once before parsing hotkeys
* Checks for the GUI lock once before parsing hotkeys
* Removed some redundant memsets
This commit is contained in:
skidau
2015-03-01 07:43:34 +11:00
parent d2abbcd353
commit a83d27b9c2
3 changed files with 26 additions and 24 deletions

View File

@ -1263,11 +1263,15 @@ const CGameListCtrl *CFrame::GetGameListCtrl() const
void CFrame::PollHotkeys(wxTimerEvent& event)
{
if (!HotkeyManagerEmu::IsReady())
return;
if (Core::GetState() == Core::CORE_UNINITIALIZED || Core::GetState() == Core::CORE_PAUSE)
g_controller_interface.UpdateInput();
if (Core::GetState() != Core::CORE_STOPPING)
{
HotkeyManagerEmu::GetStatus();
wxKeyEvent keyevent = 0;
if (IsHotkey(keyevent, HK_TOGGLE_THROTTLE))