Fix #17493: Title sequence defaults to RCT1

Even while the default config value is "*OPENRCT2", the game failed to find this config ID and fell back to the first sequence in the list instead.
This commit is contained in:
Hielke Morsink 2022-07-03 16:19:42 +02:00
parent c5871b4d0f
commit 1578cd816a
No known key found for this signature in database
GPG Key ID: FE0B343DF883E7F2
1 changed files with 2 additions and 3 deletions

View File

@ -274,8 +274,7 @@ namespace TitleSequenceManager
{
for (const auto& pseq : TitleSequenceManager::PredefinedSequences)
{
auto predefinedName = Path::GetFileNameWithoutExtension(pseq.Filename);
if (String::Equals(name, predefinedName, true))
if (String::Equals(name, pseq.ConfigId, true))
{
return true;
}
@ -317,7 +316,7 @@ const utf8* title_sequence_manager_get_config_id(size_t index)
return nullptr;
}
const auto& name = item->Name;
auto filename = Path::GetFileName(name);
const auto filename = Path::GetFileName(item->Path);
for (const auto& pseq : TitleSequenceManager::PredefinedSequences)
{
if (String::Equals(filename, pseq.Filename, true))