Skip to content

Commit

Permalink
Config: Allow the use of portable.txt (#10984)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrlinkwii committed Mar 29, 2024
1 parent b2b7fa3 commit 253e02b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ oprofile_data/
/bin/inputprofiles
/bin/videos
/bin/portable.ini
/bin/portable.txt

# Manually added by user.
/bin/resources/patches.zip
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/Pcsx2Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ void EmuFolders::SetResourcesDirectory()
bool EmuFolders::ShouldUsePortableMode()
{
// Check whether portable.ini exists in the program directory.
return FileSystem::FileExists(Path::Combine(AppRoot, "portable.ini").c_str());
return FileSystem::FileExists(Path::Combine(AppRoot, "portable.ini").c_str()) || FileSystem::FileExists(Path::Combine(AppRoot, "portable.txt").c_str());
}

void EmuFolders::SetDataDirectory()
Expand Down
3 changes: 1 addition & 2 deletions updater/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ bool Updater::ParseZip()
{
// skip updater itself, since it was already pre-extracted.
// also skips portable.ini to not mess with future non-portable installs.
if (StringUtil::Strcasecmp(entry.destination_filename.c_str(), "updater.exe") != 0 &&
StringUtil::Strcasecmp(entry.destination_filename.c_str(), "portable.ini") != 0)
if (StringUtil::Strcasecmp(entry.destination_filename.c_str(), "updater.exe") != 0)
{
m_progress->DisplayFormattedInformation("Found file in zip: '%s'", entry.destination_filename.c_str());
m_update_paths.push_back(std::move(entry));
Expand Down

0 comments on commit 253e02b

Please sign in to comment.