mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Config: Remove the use of multiple search paths.
This commit is contained in:
parent
c803e9fc58
commit
72915f88c8
5 changed files with 10 additions and 8 deletions
|
@ -364,10 +364,10 @@ bool CreateFullPath(const Path &path) {
|
|||
|
||||
std::string fullPath = path.ToString();
|
||||
int panicCounter = 100;
|
||||
VERBOSE_LOG(COMMON, "CreateFullPath: path %s", fullPath.c_str());
|
||||
VERBOSE_LOG(COMMON, "CreateFullPath: '%s'", fullPath.c_str());
|
||||
|
||||
if (File::Exists(fullPath)) {
|
||||
DEBUG_LOG(COMMON, "CreateFullPath: path exists %s", fullPath.c_str());
|
||||
DEBUG_LOG(COMMON, "CreateFullPath: path already exists: '%s'", fullPath.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1607,7 +1607,10 @@ const Path Config::FindConfigFile(const std::string &baseFilename) {
|
|||
if (!File::Exists(filename)) {
|
||||
// Make sure at least the directory it's supposed to be in exists.
|
||||
Path path = filename.NavigateUp();
|
||||
File::CreateFullPath(path);
|
||||
// This check is just to avoid logging.
|
||||
if (!File::Exists(path)) {
|
||||
File::CreateFullPath(path);
|
||||
}
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,10 @@ bool IsAudioInitialised();
|
|||
|
||||
void UpdateLoadedFile(FileLoader *fileLoader);
|
||||
|
||||
// NOTE: These are almost all derived from g_Config.memStickDirectory directly -
|
||||
// they are not stored anywhere.
|
||||
Path GetSysDirectory(PSPDirectories directoryType);
|
||||
|
||||
#ifdef _WIN32
|
||||
void InitSysDirectories();
|
||||
#endif
|
||||
|
|
|
@ -92,9 +92,6 @@ PPSSPP_UWPMain::PPSSPP_UWPMain(App ^app, const std::shared_ptr<DX::DeviceResourc
|
|||
langRegion = "en_US";
|
||||
}
|
||||
|
||||
char configFilename[MAX_PATH] = { 0 };
|
||||
char controlsConfigFilename[MAX_PATH] = { 0 };
|
||||
|
||||
std::wstring memstickFolderW = ApplicationData::Current->LocalFolder->Path->Data();
|
||||
g_Config.memStickDirectory = Path(memstickFolderW);
|
||||
|
||||
|
@ -108,7 +105,7 @@ PPSSPP_UWPMain::PPSSPP_UWPMain(App ^app, const std::shared_ptr<DX::DeviceResourc
|
|||
// if it's not loaded here first.
|
||||
g_Config.AddSearchPath(GetSysDirectory(DIRECTORY_SYSTEM));
|
||||
g_Config.SetDefaultPath(GetSysDirectory(DIRECTORY_SYSTEM));
|
||||
g_Config.Load(configFilename, controlsConfigFilename);
|
||||
g_Config.Load();
|
||||
|
||||
bool debugLogLevel = false;
|
||||
|
||||
|
|
|
@ -583,7 +583,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
|||
|
||||
// Load config up here, because those changes below would be overwritten
|
||||
// if it's not loaded here first.
|
||||
g_Config.AddSearchPath(Path());
|
||||
g_Config.AddSearchPath(GetSysDirectory(DIRECTORY_SYSTEM));
|
||||
g_Config.SetDefaultPath(GetSysDirectory(DIRECTORY_SYSTEM));
|
||||
g_Config.Load(configFilename.c_str(), controlsConfigFilename.c_str());
|
||||
|
|
Loading…
Add table
Reference in a new issue