mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Merge pull request #81 from degasus/skip_framelimit_hotkey
Add a hotkey for disabling the framelimit.
This commit is contained in:
@ -940,6 +940,10 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
OSDChoice = 4;
|
||||
g_Config.bDisableFog = !g_Config.bDisableFog;
|
||||
}
|
||||
else if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
||||
{
|
||||
Core::SetIsFramelimiterTempDisabled(true);
|
||||
}
|
||||
else if (IsHotkey(event, HK_INCREASE_FRAME_LIMIT))
|
||||
{
|
||||
if (++SConfig::GetInstance().m_Framelimit > 0x19)
|
||||
@ -1040,7 +1044,18 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
|
||||
void CFrame::OnKeyUp(wxKeyEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
if(Core::GetState() != Core::CORE_UNINITIALIZED &&
|
||||
(RendererHasFocus() || TASInputHasFocus()))
|
||||
{
|
||||
if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
||||
{
|
||||
Core::SetIsFramelimiterTempDisabled(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
void CFrame::OnMouse(wxMouseEvent& event)
|
||||
|
@ -233,6 +233,7 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void)
|
||||
_("Toggle Aspect Ratio"),
|
||||
_("Toggle EFB Copies"),
|
||||
_("Toggle Fog"),
|
||||
_("Toggle Frame limit"),
|
||||
_("Increase Frame limit"),
|
||||
_("Decrease Frame limit"),
|
||||
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user