Add hotkeys for save/load state to/from file.
This commit is contained in:
parent
c34c82e7ae
commit
e4846de692
|
@ -98,6 +98,8 @@ static const struct {
|
|||
{ "SaveFirstState", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "UndoLoadState", 351 /* WXK_F12 */, 0 /* wxMOD_NONE */ },
|
||||
{ "UndoSaveState", 351 /* WXK_F12 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateFile", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateFile", 0, 0 /* wxMOD_NONE */ },
|
||||
};
|
||||
|
||||
SConfig::SConfig()
|
||||
|
|
|
@ -64,6 +64,8 @@ enum Hotkey
|
|||
HK_SAVE_FIRST_STATE,
|
||||
HK_UNDO_LOAD_STATE,
|
||||
HK_UNDO_SAVE_STATE,
|
||||
HK_SAVE_STATE_FILE,
|
||||
HK_LOAD_STATE_FILE,
|
||||
|
||||
NUM_HOTKEYS,
|
||||
};
|
||||
|
|
|
@ -771,6 +771,8 @@ int GetCmdForHotkey(unsigned int key)
|
|||
case HK_SAVE_FIRST_STATE: return IDM_SAVEFIRSTSTATE;
|
||||
case HK_UNDO_LOAD_STATE: return IDM_UNDOLOADSTATE;
|
||||
case HK_UNDO_SAVE_STATE: return IDM_UNDOSAVESTATE;
|
||||
case HK_LOAD_STATE_FILE: return IDM_LOADSTATEFILE;
|
||||
case HK_SAVE_STATE_FILE: return IDM_SAVESTATEFILE;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
|
@ -149,12 +149,12 @@ void CFrame::CreateMenu()
|
|||
emulationMenu->Append(IDM_LOADSTATE, _("&Load State"), loadMenu);
|
||||
emulationMenu->Append(IDM_SAVESTATE, _("Sa&ve State"), saveMenu);
|
||||
|
||||
saveMenu->Append(IDM_SAVESTATEFILE, _("Save State..."));
|
||||
saveMenu->Append(IDM_SAVESTATEFILE, GetMenuLabel(HK_SAVE_STATE_FILE));
|
||||
saveMenu->Append(IDM_SAVEFIRSTSTATE, GetMenuLabel(HK_SAVE_FIRST_STATE));
|
||||
loadMenu->Append(IDM_UNDOSAVESTATE, GetMenuLabel(HK_UNDO_SAVE_STATE));
|
||||
saveMenu->AppendSeparator();
|
||||
|
||||
loadMenu->Append(IDM_LOADSTATEFILE, _("Load State..."));
|
||||
loadMenu->Append(IDM_LOADSTATEFILE, GetMenuLabel(HK_LOAD_STATE_FILE));
|
||||
|
||||
loadMenu->Append(IDM_UNDOLOADSTATE, GetMenuLabel(HK_UNDO_LOAD_STATE));
|
||||
loadMenu->AppendSeparator();
|
||||
|
@ -397,6 +397,9 @@ wxString CFrame::GetMenuLabel(int Id)
|
|||
Label = wxString::Format(_("Slot %i"),
|
||||
Id - HK_SAVE_STATE_SLOT_1 + 1);
|
||||
break;
|
||||
case HK_SAVE_STATE_FILE:
|
||||
Label = _("Save State...");
|
||||
break;
|
||||
|
||||
case HK_LOAD_LAST_STATE_1:
|
||||
case HK_LOAD_LAST_STATE_2:
|
||||
|
@ -409,6 +412,9 @@ wxString CFrame::GetMenuLabel(int Id)
|
|||
Label = wxString::Format(_("Last %i"),
|
||||
Id - HK_LOAD_LAST_STATE_1 + 1);
|
||||
break;
|
||||
case HK_LOAD_STATE_FILE:
|
||||
Label = _("Load State...");
|
||||
break;
|
||||
|
||||
case HK_SAVE_FIRST_STATE: Label = wxString("Save Oldest State"); break;
|
||||
case HK_UNDO_LOAD_STATE: Label = wxString("Undo Load State"); break;
|
||||
|
|
|
@ -216,7 +216,9 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void)
|
|||
|
||||
_("Save Oldest State"),
|
||||
_("Undo Load State"),
|
||||
_("Undo Save State")
|
||||
_("Undo Save State"),
|
||||
_("Save State"),
|
||||
_("Load State"),
|
||||
};
|
||||
|
||||
const int page_breaks[3] = {HK_OPEN, HK_LOAD_STATE_SLOT_1, NUM_HOTKEYS};
|
||||
|
|
Loading…
Reference in New Issue