Fix GUI hotkeys like Alt+F5 etc.
Fixes issue 2608 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5391 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d86167961c
commit
badf7c2771
|
@ -861,6 +861,30 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||||
// Stop
|
// Stop
|
||||||
else if (IsHotkey(event, HK_STOP))
|
else if (IsHotkey(event, HK_STOP))
|
||||||
DoStop();
|
DoStop();
|
||||||
|
// state save and state load hotkeys
|
||||||
|
else if (event.GetKeyCode() >= WXK_F1 && event.GetKeyCode() <= WXK_F8)
|
||||||
|
{
|
||||||
|
int slot_number = event.GetKeyCode() - WXK_F1 + 1;
|
||||||
|
if (event.GetModifiers() == wxMOD_NONE)
|
||||||
|
State_Load(slot_number);
|
||||||
|
else if (event.GetModifiers() == wxMOD_SHIFT)
|
||||||
|
State_Save(slot_number);
|
||||||
|
else event.Skip();
|
||||||
|
}
|
||||||
|
else if (event.GetKeyCode() == WXK_F11 && event.GetModifiers() == wxMOD_NONE)
|
||||||
|
State_LoadLastSaved();
|
||||||
|
else if (event.GetKeyCode() == WXK_F12)
|
||||||
|
{
|
||||||
|
if (event.GetModifiers() == wxMOD_NONE)
|
||||||
|
State_UndoSaveState();
|
||||||
|
else if (event.GetModifiers() == wxMOD_SHIFT)
|
||||||
|
State_UndoLoadState();
|
||||||
|
else event.Skip();
|
||||||
|
}
|
||||||
|
// screenshot hotkeys
|
||||||
|
else if (event.GetKeyCode() == WXK_F9 && event.GetModifiers() == wxMOD_NONE)
|
||||||
|
Core::ScreenShot();
|
||||||
|
else event.Skip();
|
||||||
|
|
||||||
// Send the OSD hotkeys to the video plugin
|
// Send the OSD hotkeys to the video plugin
|
||||||
if (event.GetKeyCode() >= '3' && event.GetKeyCode() <= '7' && event.GetModifiers() == wxMOD_NONE)
|
if (event.GetKeyCode() >= '3' && event.GetKeyCode() <= '7' && event.GetModifiers() == wxMOD_NONE)
|
||||||
|
@ -877,27 +901,6 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||||
&& event.GetModifiers() == wxMOD_SHIFT)
|
&& event.GetModifiers() == wxMOD_SHIFT)
|
||||||
PostMessage((HWND)Core::GetWindowHandle(), WM_USER, WM_USER_KEYDOWN, event.GetKeyCode());
|
PostMessage((HWND)Core::GetWindowHandle(), WM_USER, WM_USER_KEYDOWN, event.GetKeyCode());
|
||||||
#endif
|
#endif
|
||||||
// state save and state load hotkeys
|
|
||||||
if (event.GetKeyCode() >= WXK_F1 && event.GetKeyCode() <= WXK_F8)
|
|
||||||
{
|
|
||||||
int slot_number = event.GetKeyCode() - WXK_F1 + 1;
|
|
||||||
if (event.GetModifiers() == wxMOD_NONE)
|
|
||||||
State_Load(slot_number);
|
|
||||||
else if (event.GetModifiers() == wxMOD_SHIFT)
|
|
||||||
State_Save(slot_number);
|
|
||||||
}
|
|
||||||
if (event.GetKeyCode() == WXK_F11 && event.GetModifiers() == wxMOD_NONE)
|
|
||||||
State_LoadLastSaved();
|
|
||||||
if (event.GetKeyCode() == WXK_F12)
|
|
||||||
{
|
|
||||||
if (event.GetModifiers() == wxMOD_NONE)
|
|
||||||
State_UndoSaveState();
|
|
||||||
else if (event.GetModifiers() == wxMOD_SHIFT)
|
|
||||||
State_UndoLoadState();
|
|
||||||
}
|
|
||||||
// screenshot hotkeys
|
|
||||||
if (event.GetKeyCode() == WXK_F9 && event.GetModifiers() == wxMOD_NONE)
|
|
||||||
Core::ScreenShot();
|
|
||||||
|
|
||||||
// Send the keyboard status to the Input plugin
|
// Send the keyboard status to the Input plugin
|
||||||
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 1); // 1 = Down
|
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 1); // 1 = Down
|
||||||
|
|
Loading…
Reference in New Issue