mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-04 12:37:08 +00:00
Try default constructors for Symbian.
This commit is contained in:
parent
306786db60
commit
c52b73393b
@ -335,7 +335,6 @@ namespace SaveState
|
||||
std::string fn = GenerateSaveSlotFilename(slot, STATE_EXTENSION);
|
||||
std::string shot = GenerateSaveSlotFilename(slot, SCREENSHOT_EXTENSION);
|
||||
if (!fn.empty()) {
|
||||
#ifndef __SYMBIAN32__
|
||||
auto renameCallback = [=](bool status, void *data) {
|
||||
if (status) {
|
||||
if (File::Exists(fn)) {
|
||||
@ -348,11 +347,8 @@ namespace SaveState
|
||||
}
|
||||
};
|
||||
// Let's also create a screenshot.
|
||||
SaveScreenshot(shot, nullptr, 0);
|
||||
SaveScreenshot(shot, Callback(), 0);
|
||||
Save(fn + ".tmp", renameCallback, cbUserData);
|
||||
#else
|
||||
Save(fn, renameCallback, cbUserData);
|
||||
#endif
|
||||
} else {
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
osm.Show("Failed to save state. Error in the file system.", 2.0);
|
||||
|
@ -45,22 +45,22 @@ namespace SaveState
|
||||
|
||||
// Load the specified file into the current state (async.)
|
||||
// Warning: callback will be called on a different thread.
|
||||
void Load(const std::string &filename, Callback callback = nullptr, void *cbUserData = 0);
|
||||
void Load(const std::string &filename, Callback callback = Callback(), void *cbUserData = 0);
|
||||
|
||||
// Save the current state to the specified file (async.)
|
||||
// Warning: callback will be called on a different thread.
|
||||
void Save(const std::string &filename, Callback callback = nullptr, void *cbUserData = 0);
|
||||
void Save(const std::string &filename, Callback callback = Callback(), void *cbUserData = 0);
|
||||
|
||||
CChunkFileReader::Error SaveToRam(std::vector<u8> &state);
|
||||
CChunkFileReader::Error LoadFromRam(std::vector<u8> &state);
|
||||
|
||||
// For testing / automated tests. Runs a save state verification pass (async.)
|
||||
// Warning: callback will be called on a different thread.
|
||||
void Verify(Callback callback = nullptr, void *cbUserData = 0);
|
||||
void Verify(Callback callback = Callback(), void *cbUserData = 0);
|
||||
|
||||
// To go back to a previous snapshot (only if enabled.)
|
||||
// Warning: callback will be called on a different thread.
|
||||
void Rewind(Callback callback = nullptr, void *cbUserData = 0);
|
||||
void Rewind(Callback callback = Callback(), void *cbUserData = 0);
|
||||
|
||||
// Returns true if there are rewind snapshots available.
|
||||
bool CanRewind();
|
||||
|
@ -332,11 +332,11 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
||||
}
|
||||
break;
|
||||
case VIRTKEY_SAVE_STATE:
|
||||
SaveState::SaveSlot(g_Config.iCurrentStateSlot, nullptr);
|
||||
SaveState::SaveSlot(g_Config.iCurrentStateSlot, SaveState::Callback());
|
||||
break;
|
||||
case VIRTKEY_LOAD_STATE:
|
||||
if (SaveState::HasSaveInSlot(g_Config.iCurrentStateSlot)) {
|
||||
SaveState::LoadSlot(g_Config.iCurrentStateSlot, nullptr);
|
||||
SaveState::LoadSlot(g_Config.iCurrentStateSlot, SaveState::Callback());
|
||||
}
|
||||
break;
|
||||
case VIRTKEY_NEXT_SLOT:
|
||||
@ -800,7 +800,7 @@ void EmuScreen::autoLoad() {
|
||||
//check if save state has save, if so, load
|
||||
int lastSlot = SaveState::GetNewestSlot();
|
||||
if (g_Config.bEnableAutoLoad && lastSlot != -1) {
|
||||
SaveState::LoadSlot(lastSlot, nullptr, 0);
|
||||
SaveState::LoadSlot(lastSlot, SaveState::Callback(), 0);
|
||||
g_Config.iCurrentStateSlot = lastSlot;
|
||||
}
|
||||
}
|
||||
|
@ -1235,21 +1235,21 @@ UI::EventReturn GamePauseScreen::OnReportFeedback(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn GamePauseScreen::OnLoadState(UI::EventParams &e) {
|
||||
SaveState::LoadSlot(saveSlots_->GetSelection(), nullptr, 0);
|
||||
SaveState::LoadSlot(saveSlots_->GetSelection(), SaveState::Callback(), 0);
|
||||
|
||||
screenManager()->finishDialog(this, DR_CANCEL);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GamePauseScreen::OnSaveState(UI::EventParams &e) {
|
||||
SaveState::SaveSlot(saveSlots_->GetSelection(), nullptr, 0);
|
||||
SaveState::SaveSlot(saveSlots_->GetSelection(), SaveState::Callback(), 0);
|
||||
|
||||
screenManager()->finishDialog(this, DR_CANCEL);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GamePauseScreen::OnRewind(UI::EventParams &e) {
|
||||
SaveState::Rewind(nullptr, 0);
|
||||
SaveState::Rewind(SaveState::Callback(), 0);
|
||||
|
||||
screenManager()->finishDialog(this, DR_CANCEL);
|
||||
return UI::EVENT_DONE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user