mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Merge pull request #7476 from Bigpet/confsave
Just save the current config every time the config file is switched
This commit is contained in:
commit
77693633d7
@ -1104,6 +1104,7 @@ bool Config::hasGameConfig(const std::string &pGameId)
|
||||
|
||||
void Config::changeGameSpecific(const std::string &pGameId)
|
||||
{
|
||||
Save();
|
||||
gameId_ = pGameId;
|
||||
bGameSpecific = !pGameId.empty();
|
||||
}
|
||||
|
@ -230,7 +230,6 @@ void CPU_Init() {
|
||||
|
||||
if (coreParameter.updateRecent) {
|
||||
g_Config.AddRecent(filename);
|
||||
g_Config.Save();
|
||||
}
|
||||
|
||||
coreState = coreParameter.startPaused ? CORE_STEPPING : CORE_RUNNING;
|
||||
|
@ -59,7 +59,6 @@ bool GameInfo::DeleteGame() {
|
||||
auto i = std::find(g_Config.recentIsos.begin(), g_Config.recentIsos.end(), fileToRemove);
|
||||
if (i != g_Config.recentIsos.end()) {
|
||||
g_Config.recentIsos.erase(i);
|
||||
g_Config.Save();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -301,7 +301,6 @@ UI::EventReturn GameScreen::OnRemoveFromRecent(UI::EventParams &e) {
|
||||
if (!strcmp((*it).c_str(), gamePath_.c_str())) {
|
||||
#endif
|
||||
g_Config.recentIsos.erase(it);
|
||||
g_Config.Save();
|
||||
screenManager()->switchScreen(new MainScreen());
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
@ -76,7 +76,6 @@ void GameSettingsScreen::CreateViews() {
|
||||
|
||||
if (bEditThenRestore)
|
||||
{
|
||||
g_Config.changeGameSpecific(gameID_);
|
||||
g_Config.loadGameConfig(gameID_);
|
||||
}
|
||||
|
||||
|
@ -395,8 +395,8 @@ void GamePauseScreen::CallbackDeleteConfig(bool yes)
|
||||
{
|
||||
if (yes) {
|
||||
GameInfo *info = g_gameInfoCache.GetInfo(NULL, gamePath_, 0);
|
||||
g_Config.deleteGameConfig(info->id);
|
||||
g_Config.unloadGameConfig();
|
||||
g_Config.deleteGameConfig(info->id);
|
||||
screenManager()->RecreateAllViews();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user