Skip to content

Commit

Permalink
Do the same for the current browsed directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed May 29, 2024
1 parent 606a895 commit 8691390
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ static const char * const logSectionName = "LogDebug";
static const char * const logSectionName = "Log";
#endif

static bool TryUpdateSavedPath(Path *path);

std::string GPUBackendToString(GPUBackend backend) {
switch (backend) {
case GPUBackend::OPENGL:
Expand Down Expand Up @@ -1147,6 +1149,9 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {

iRunCount++;

// For iOS, issue #19211
TryUpdateSavedPath(&currentDirectory);

// This check is probably not really necessary here anyway, you can always
// press Home or Browse if you're in a bad directory.
if (!File::Exists(currentDirectory))
Expand Down Expand Up @@ -1550,7 +1555,7 @@ void Config::RemoveRecent(const std::string &file) {
// Example path:
// /var/mobile/Containers/Data/Application/0E0E89DE-8D8E-485A-860C-700D8BC87B86/Documents/PSP/GAME/SuicideBarbie
// The GUID part changes on each launch.
bool TryUpdateSavedPath(Path *path) {
static bool TryUpdateSavedPath(Path *path) {
#if PPSSPP_PLATFORM(IOS)
INFO_LOG(LOADER, "Original path: %s", path->c_str());
std::string pathStr = path->ToString();
Expand Down

0 comments on commit 8691390

Please sign in to comment.