Config: Allow the use of portable.txt (#10984)

This commit is contained in:
Mrlinkwii 2024-03-29 03:12:00 +00:00 committed by GitHub
parent b2b7fa36bb
commit 253e02b4c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

1
.gitignore vendored
View File

@ -91,6 +91,7 @@ oprofile_data/
/bin/inputprofiles /bin/inputprofiles
/bin/videos /bin/videos
/bin/portable.ini /bin/portable.ini
/bin/portable.txt
# Manually added by user. # Manually added by user.
/bin/resources/patches.zip /bin/resources/patches.zip

View File

@ -1898,7 +1898,7 @@ void EmuFolders::SetResourcesDirectory()
bool EmuFolders::ShouldUsePortableMode() bool EmuFolders::ShouldUsePortableMode()
{ {
// Check whether portable.ini exists in the program directory. // 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() void EmuFolders::SetDataDirectory()

View File

@ -192,8 +192,7 @@ bool Updater::ParseZip()
{ {
// skip updater itself, since it was already pre-extracted. // skip updater itself, since it was already pre-extracted.
// also skips portable.ini to not mess with future non-portable installs. // also skips portable.ini to not mess with future non-portable installs.
if (StringUtil::Strcasecmp(entry.destination_filename.c_str(), "updater.exe") != 0 && if (StringUtil::Strcasecmp(entry.destination_filename.c_str(), "updater.exe") != 0)
StringUtil::Strcasecmp(entry.destination_filename.c_str(), "portable.ini") != 0)
{ {
m_progress->DisplayFormattedInformation("Found file in zip: '%s'", entry.destination_filename.c_str()); m_progress->DisplayFormattedInformation("Found file in zip: '%s'", entry.destination_filename.c_str());
m_update_paths.push_back(std::move(entry)); m_update_paths.push_back(std::move(entry));