mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 07:50:28 +02:00
Android: Reload game config on storage permission.
Before, we were saving out the global values on top of the game config while loading them. We seem to get the storage permission event twice sometimes, which is what causes this to happen after we've already loaded the game config.
This commit is contained in:
1 parent
fc8306dde1
commit
9d7dc97c3e
3 files changed
+12
-3
No files matched your search
+9
-2
@@ -1114,6 +1114,12 @@ std::map<std::string, std::pair<std::string, int>> GetLangValuesMapping() {
|
||||
return langValuesMapping;
|
||||
}
|
||||
|
||||
void Config::Reload() {
|
||||
reload_ = true;
|
||||
Load();
|
||||
reload_ = false;
|
||||
}
|
||||
|
||||
void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
|
||||
const bool useIniFilename = iniFileName != nullptr && strlen(iniFileName) > 0;
|
||||
iniFilename_ = FindConfigFile(useIniFilename ? iniFileName : "ppsspp.ini");
|
||||
@@ -1489,7 +1495,8 @@ bool Config::hasGameConfig(const std::string &pGameId) {
|
||||
}
|
||||
|
||||
void Config::changeGameSpecific(const std::string &pGameId, const std::string &title) {
|
||||
Save("changeGameSpecific");
|
||||
if (!reload_)
|
||||
Save("changeGameSpecific");
|
||||
gameId_ = pGameId;
|
||||
gameIdTitle_ = title;
|
||||
bGameSpecific = !pGameId.empty();
|
||||
@@ -1568,7 +1575,7 @@ bool Config::loadGameConfig(const std::string &pGameId, const std::string &title
|
||||
}
|
||||
|
||||
void Config::unloadGameConfig() {
|
||||
if (bGameSpecific){
|
||||
if (bGameSpecific) {
|
||||
changeGameSpecific();
|
||||
|
||||
IniFile iniFile;
|
||||
|
||||
Reference in new issue
Block a user