mirror of
https://github.com/stenzek/duckstation.git
synced 2024-11-27 08:00:36 +00:00
System: Load game settings from first disc of multi-disc games
This commit is contained in:
parent
073ac87be2
commit
9bdf23cba7
@ -952,8 +952,11 @@ std::optional<DiscRegion> System::GetRegionForPath(const char* image_path)
|
||||
|
||||
std::string System::GetGameSettingsPath(std::string_view game_serial)
|
||||
{
|
||||
const std::string sanitized_serial(Path::SanitizeFileName(game_serial));
|
||||
return Path::Combine(EmuFolders::GameSettings, fmt::format("{}.ini", sanitized_serial));
|
||||
// multi-disc games => always use the first disc
|
||||
const GameDatabase::Entry* entry = GameDatabase::GetEntryForSerial(game_serial);
|
||||
const std::string_view serial_for_path =
|
||||
(entry && !entry->disc_set_serials.empty()) ? entry->disc_set_serials.front() : game_serial;
|
||||
return Path::Combine(EmuFolders::GameSettings, fmt::format("{}.ini", Path::SanitizeFileName(serial_for_path)));
|
||||
}
|
||||
|
||||
std::string System::GetInputProfilePath(std::string_view name)
|
||||
|
Loading…
Reference in New Issue
Block a user