mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 20:43:04 +01:00
Use u8string for ScenarioIndexEntry Path
This commit is contained in:
@@ -204,10 +204,10 @@ private:
|
||||
{
|
||||
auto& objRepository = OpenRCT2::GetContext()->GetObjectRepository();
|
||||
auto importer = ParkImporter::CreateParkFile(objRepository);
|
||||
importer->LoadScenario(path.c_str(), true);
|
||||
importer->LoadScenario(path, true);
|
||||
if (importer->GetDetails(entry))
|
||||
{
|
||||
String::Set(entry->Path, sizeof(entry->Path), path.c_str());
|
||||
entry->Path = path;
|
||||
entry->Timestamp = timestamp;
|
||||
result = true;
|
||||
}
|
||||
@@ -225,10 +225,10 @@ private:
|
||||
try
|
||||
{
|
||||
auto s4Importer = ParkImporter::CreateS4();
|
||||
s4Importer->LoadScenario(path.c_str(), true);
|
||||
s4Importer->LoadScenario(path, true);
|
||||
if (s4Importer->GetDetails(entry))
|
||||
{
|
||||
String::Set(entry->Path, sizeof(entry->Path), path.c_str());
|
||||
entry->Path = path;
|
||||
entry->Timestamp = timestamp;
|
||||
result = true;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ private:
|
||||
ScenarioIndexEntry entry = {};
|
||||
|
||||
// Set new entry
|
||||
String::Set(entry.Path, sizeof(entry.Path), path.c_str());
|
||||
entry.Path = path;
|
||||
entry.Timestamp = timestamp;
|
||||
entry.Category = s6Info->Category;
|
||||
entry.ObjectiveType = s6Info->ObjectiveType;
|
||||
@@ -562,7 +562,7 @@ private:
|
||||
if (existingEntry->Timestamp > entry.Timestamp)
|
||||
{
|
||||
// Existing entry is more recent
|
||||
conflictPath = String::ToStd(existingEntry->Path);
|
||||
conflictPath = existingEntry->Path;
|
||||
|
||||
// Overwrite existing entry with this one
|
||||
*existingEntry = entry;
|
||||
|
||||
@@ -42,7 +42,7 @@ enum class ScenarioSource : uint8_t
|
||||
|
||||
struct ScenarioIndexEntry
|
||||
{
|
||||
utf8 Path[MAX_PATH];
|
||||
u8string Path;
|
||||
uint64_t Timestamp;
|
||||
|
||||
// Category / sequence
|
||||
|
||||
Reference in New Issue
Block a user