Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaveState: Allow rewind on mobile #13866

Merged
merged 1 commit into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Core/KeyMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,9 @@ const KeyMap_IntStrPair psp_button_names[] = {
{VIRTKEY_PAUSE, "Pause"},
#ifndef MOBILE_DEVICE
{VIRTKEY_FRAME_ADVANCE, "Frame Advance"},
{VIRTKEY_REWIND, "Rewind"},
{VIRTKEY_RECORD, "Audio/Video Recording" },
#endif
{VIRTKEY_REWIND, "Rewind"},
{VIRTKEY_SAVE_STATE, "Save State"},
{VIRTKEY_LOAD_STATE, "Load State"},
{VIRTKEY_NEXT_SLOT, "Next Slot"},
Expand Down
6 changes: 1 addition & 5 deletions Core/SaveState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ namespace SaveState
return false;
}

#ifndef MOBILE_DEVICE
static inline void CheckRewindState()
{
if (gpuStats.numFlips % g_Config.iRewindFlipFrequency != 0)
Expand All @@ -689,10 +688,9 @@ namespace SaveState
return;

rewindLastTime = now;
DEBUG_LOG(BOOT, "saving rewind state");
DEBUG_LOG(BOOT, "Saving rewind state");
rewindStates.Save();
}
#endif

bool HasLoadedState() {
return hasLoadedState;
Expand All @@ -719,10 +717,8 @@ namespace SaveState

void Process()
{
#ifndef MOBILE_DEVICE
if (g_Config.iRewindFlipFrequency != 0 && gpuStats.numFlips != 0)
CheckRewindState();
#endif

if (!needsProcess)
return;
Expand Down