mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
"Next Slot" control mapping
-added "Next Slot" to control mapping menu -added VIRTKEY_NEXT_SLOT -> incremented VIRTKEY_TOGGLE_FULLSCREEN -added SaveState::NextSlot(); as replacement for code in WndMainWindow -added entry in EmuScreen using SaveState::NextSlot();
This commit is contained in:
parent
eea5b07e1a
commit
26fbb4c32c
@ -611,6 +611,7 @@ const KeyMap_IntStrPair psp_button_names[] = {
|
||||
#endif
|
||||
{VIRTKEY_SAVE_STATE, "Save State"},
|
||||
{VIRTKEY_LOAD_STATE, "Load State"},
|
||||
{VIRTKEY_NEXT_SLOT, "Next Slot"},
|
||||
#if !defined(_WIN32) && !defined(USING_GLES2)
|
||||
{VIRTKEY_TOGGLE_FULLSCREEN, "Toggle Fullscreen"},
|
||||
#endif
|
||||
|
@ -43,7 +43,8 @@ enum {
|
||||
VIRTKEY_REWIND = 0x1000c,
|
||||
VIRTKEY_SAVE_STATE = 0x1000d,
|
||||
VIRTKEY_LOAD_STATE = 0x1000e,
|
||||
VIRTKEY_TOGGLE_FULLSCREEN = 0x1000f,
|
||||
VIRTKEY_NEXT_SLOT = 0x1000f,
|
||||
VIRTKEY_TOGGLE_FULLSCREEN = 0x10010,
|
||||
VIRTKEY_LAST,
|
||||
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
|
||||
};
|
||||
|
@ -224,6 +224,15 @@ namespace SaveState
|
||||
}
|
||||
}
|
||||
|
||||
void NextSlot()
|
||||
{
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
g_Config.iCurrentStateSlot = (g_Config.iCurrentStateSlot + 1) % SaveState::SAVESTATESLOTS;
|
||||
char msg[30];
|
||||
sprintf(msg, "%s: %d", sy->T("Savestate Slot"), g_Config.iCurrentStateSlot + 1);
|
||||
osm.Show(msg);
|
||||
}
|
||||
|
||||
void LoadSlot(int slot, Callback callback, void *cbUserData)
|
||||
{
|
||||
std::string fn = GenerateSaveSlotFilename(slot, STATE_EXTENSION);
|
||||
|
@ -29,6 +29,8 @@ namespace SaveState
|
||||
|
||||
void Init();
|
||||
|
||||
// Cycle through the 5 savestate slots
|
||||
void NextSlot();
|
||||
void SaveSlot(int slot, Callback callback, void *cbUserData = 0);
|
||||
void LoadSlot(int slot, Callback callback, void *cbUserData = 0);
|
||||
// Checks whether there's an existing save in the specified slot.
|
||||
|
@ -277,6 +277,9 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
SaveState::LoadSlot(g_Config.iCurrentStateSlot, 0);
|
||||
}
|
||||
break;
|
||||
case VIRTKEY_NEXT_SLOT:
|
||||
SaveState::NextSlot();
|
||||
break;
|
||||
case VIRTKEY_TOGGLE_FULLSCREEN:
|
||||
System_SendMessage("toggle_fullscreen", "");
|
||||
break;
|
||||
|
@ -1229,11 +1229,7 @@ namespace MainWindow
|
||||
|
||||
case ID_FILE_SAVESTATE_NEXT_SLOT:
|
||||
{
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
g_Config.iCurrentStateSlot = (g_Config.iCurrentStateSlot + 1) % SaveState::SAVESTATESLOTS;
|
||||
char msg[30];
|
||||
sprintf(msg, "%s: %d", sy->T("Savestate Slot"), g_Config.iCurrentStateSlot + 1);
|
||||
osm.Show(msg);
|
||||
SaveState::NextSlot();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user