mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
created auto load feature
This commit is contained in:
parent
122f19a3cf
commit
6cd5b748eb
5 changed files with 23 additions and 0 deletions
|
@ -72,6 +72,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
|
||||||
|
|
||||||
general->Get("Language", &sLanguageIni, defaultLangRegion.c_str());
|
general->Get("Language", &sLanguageIni, defaultLangRegion.c_str());
|
||||||
general->Get("NumWorkerThreads", &iNumWorkerThreads, cpu_info.num_cores);
|
general->Get("NumWorkerThreads", &iNumWorkerThreads, cpu_info.num_cores);
|
||||||
|
general->Get("EnableAutoLoad", &bEnableAutoLoad, true);
|
||||||
general->Get("EnableCheats", &bEnableCheats, false);
|
general->Get("EnableCheats", &bEnableCheats, false);
|
||||||
general->Get("ScreenshotsAsPNG", &bScreenshotsAsPNG, false);
|
general->Get("ScreenshotsAsPNG", &bScreenshotsAsPNG, false);
|
||||||
general->Get("StateSlot", &iCurrentStateSlot, 0);
|
general->Get("StateSlot", &iCurrentStateSlot, 0);
|
||||||
|
@ -336,6 +337,7 @@ void Config::Save() {
|
||||||
#endif
|
#endif
|
||||||
general->Set("Language", sLanguageIni);
|
general->Set("Language", sLanguageIni);
|
||||||
general->Set("NumWorkerThreads", iNumWorkerThreads);
|
general->Set("NumWorkerThreads", iNumWorkerThreads);
|
||||||
|
general->Set("EnableAutoLoad", bEnableAutoLoad);
|
||||||
general->Set("EnableCheats", bEnableCheats);
|
general->Set("EnableCheats", bEnableCheats);
|
||||||
general->Set("ScreenshotsAsPNG", bScreenshotsAsPNG);
|
general->Set("ScreenshotsAsPNG", bScreenshotsAsPNG);
|
||||||
general->Set("StateSlot", iCurrentStateSlot);
|
general->Set("StateSlot", iCurrentStateSlot);
|
||||||
|
|
|
@ -92,6 +92,7 @@ public:
|
||||||
int iForceMaxEmulatedFPS;
|
int iForceMaxEmulatedFPS;
|
||||||
int iMaxRecent;
|
int iMaxRecent;
|
||||||
int iCurrentStateSlot;
|
int iCurrentStateSlot;
|
||||||
|
bool bEnableAutoLoad;
|
||||||
bool bEnableCheats;
|
bool bEnableCheats;
|
||||||
bool bReloadCheats;
|
bool bReloadCheats;
|
||||||
bool bDisableStencilTest;
|
bool bDisableStencilTest;
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "Core/HLE/sceCtrl.h"
|
#include "Core/HLE/sceCtrl.h"
|
||||||
#include "Core/HLE/sceDisplay.h"
|
#include "Core/HLE/sceDisplay.h"
|
||||||
#include "Core/Debugger/SymbolMap.h"
|
#include "Core/Debugger/SymbolMap.h"
|
||||||
|
#include "Core/SaveState.h"
|
||||||
|
|
||||||
#include "UI/OnScreenDisplay.h"
|
#include "UI/OnScreenDisplay.h"
|
||||||
#include "UI/ui_atlas.h"
|
#include "UI/ui_atlas.h"
|
||||||
|
@ -122,6 +123,8 @@ void EmuScreen::bootGame(const std::string &filename) {
|
||||||
if (strstr(renderer, "Chainfire3D") != 0) {
|
if (strstr(renderer, "Chainfire3D") != 0) {
|
||||||
osm.Show(s->T("Chainfire3DWarning", "WARNING: Chainfire3D detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true);
|
osm.Show(s->T("Chainfire3DWarning", "WARNING: Chainfire3D detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
autoLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
EmuScreen::~EmuScreen() {
|
EmuScreen::~EmuScreen() {
|
||||||
|
@ -138,6 +141,13 @@ void EmuScreen::dialogFinished(const Screen *dialog, DialogResult result) {
|
||||||
if (result == DR_OK) {
|
if (result == DR_OK) {
|
||||||
screenManager()->switchScreen(new MainScreen());
|
screenManager()->switchScreen(new MainScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//user didn't click continue. he went back to the main screen and is loading
|
||||||
|
//the game from there.
|
||||||
|
if(result != DR_CANCEL && result != DR_BACK){
|
||||||
|
autoLoad();
|
||||||
|
}
|
||||||
|
|
||||||
RecreateViews();
|
RecreateViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -620,3 +630,10 @@ void EmuScreen::deviceLost() {
|
||||||
if (gpu)
|
if (gpu)
|
||||||
gpu->DeviceLost();
|
gpu->DeviceLost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EmuScreen::autoLoad(){
|
||||||
|
//check if save state has save, if so, load
|
||||||
|
if(g_Config.bEnableAutoLoad && SaveState::HasSaveInSlot(g_Config.iCurrentStateSlot)){
|
||||||
|
SaveState::LoadSlot(g_Config.iCurrentStateSlot, 0, 0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -55,6 +55,8 @@ private:
|
||||||
void setVKeyAnalogX(int stick, int virtualKeyMin, int virtualKeyMax);
|
void setVKeyAnalogX(int stick, int virtualKeyMin, int virtualKeyMax);
|
||||||
void setVKeyAnalogY(int stick, int virtualKeyMin, int virtualKeyMax);
|
void setVKeyAnalogY(int stick, int virtualKeyMin, int virtualKeyMax);
|
||||||
|
|
||||||
|
void autoLoad();
|
||||||
|
|
||||||
bool booted_;
|
bool booted_;
|
||||||
std::string gamePath_;
|
std::string gamePath_;
|
||||||
|
|
||||||
|
|
|
@ -264,6 +264,7 @@ void GameSettingsScreen::CreateViews() {
|
||||||
systemSettings->Add(new Choice(s->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
|
systemSettings->Add(new Choice(s->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
|
||||||
systemSettings->Add(new Choice(s->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents);
|
systemSettings->Add(new Choice(s->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents);
|
||||||
systemSettings->Add(new Choice(s->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings);
|
systemSettings->Add(new Choice(s->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings);
|
||||||
|
systemSettings->Add(new CheckBox(&g_Config.bEnableAutoLoad, s->T("Enable Auto Load")));
|
||||||
enableReportsCheckbox_ = new CheckBox(&enableReports_, s->T("Enable Compatibility Server Reports"));
|
enableReportsCheckbox_ = new CheckBox(&enableReports_, s->T("Enable Compatibility Server Reports"));
|
||||||
enableReportsCheckbox_->SetEnabled(Reporting::IsSupported());
|
enableReportsCheckbox_->SetEnabled(Reporting::IsSupported());
|
||||||
systemSettings->Add(enableReportsCheckbox_);
|
systemSettings->Add(enableReportsCheckbox_);
|
||||||
|
|
Loading…
Add table
Reference in a new issue