1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Fix #4910: Title sequences get labelled incorrectly in game options

This commit is contained in:
Ted John
2016-12-24 00:06:42 +00:00
parent c44c93a627
commit c2d2a515b4

View File

@@ -235,6 +235,8 @@ namespace TitleSequenceManager
static void AddSequence(const utf8 * scanPath)
{
TitleSequenceManagerItem item;
std::string path;
bool isZip = true;
if (String::Equals(Path::GetExtension(scanPath), ".txt", true))
@@ -244,13 +246,14 @@ namespace TitleSequenceManager
path = std::string(utf8Path);
Memory::Free(utf8Path);
isZip = false;
item.Name = Path::GetFileName(path.c_str());
}
else
{
path = std::string(scanPath);
item.Name = GetNameFromSequencePath(path);
}
TitleSequenceManagerItem item;
item.PredefinedIndex = GetPredefinedIndex(path);
item.Path = path;
if (item.PredefinedIndex != PREDEFINED_INDEX_CUSTOM)
@@ -258,10 +261,6 @@ namespace TitleSequenceManager
rct_string_id stringId = PredefinedSequences[item.PredefinedIndex].StringId;
item.Name = String::Duplicate(language_get_string(stringId));
}
else
{
item.Name = GetNameFromSequencePath(path);
}
item.IsZip = isZip;
_items.push_back(item);
}