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)
|
std::string System::GetGameSettingsPath(std::string_view game_serial)
|
||||||
{
|
{
|
||||||
const std::string sanitized_serial(Path::SanitizeFileName(game_serial));
|
// multi-disc games => always use the first disc
|
||||||
return Path::Combine(EmuFolders::GameSettings, fmt::format("{}.ini", sanitized_serial));
|
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)
|
std::string System::GetInputProfilePath(std::string_view name)
|
||||||
|
|
Loading…
Reference in New Issue