mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 07:44:38 +01:00
Use streams for reading parks in S4 importer
This commit is contained in:
@@ -317,12 +317,18 @@ private:
|
||||
// RCT1 scenario
|
||||
bool result = false;
|
||||
IS4Importer * s4Importer = CreateS4Importer();
|
||||
s4Importer->LoadScenario(path.c_str());
|
||||
if (s4Importer->GetDetails(entry))
|
||||
try
|
||||
{
|
||||
s4Importer->LoadScenario(path.c_str());
|
||||
if (s4Importer->GetDetails(entry))
|
||||
{
|
||||
String::Set(entry->path, sizeof(entry->path), path.c_str());
|
||||
entry->timestamp = timestamp;
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
String::Set(entry->path, sizeof(entry->path), path.c_str());
|
||||
entry->timestamp = timestamp;
|
||||
result = true;
|
||||
}
|
||||
delete s4Importer;
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user