1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 18:55:23 +01:00

Work around TryClassifyFile not working with .sea files

This commit is contained in:
Aaron van Geffen
2025-05-25 22:21:08 +02:00
parent 2b41a99449
commit d51a1754b4

View File

@@ -205,10 +205,9 @@ namespace OpenRCT2::Ui::Windows
auto& name = _highlightedScenario->InternalName;
ClassifiedFileInfo info;
if (!TryClassifyFile(path, &info))
return;
bool isClassified = TryClassifyFile(path, &info);
if (info.Type == FileType::park)
if (isClassified && info.Type == FileType::park)
{
_previewLoadJob = bgWorker.addJob(
[path, name]() {
@@ -237,7 +236,7 @@ namespace OpenRCT2::Ui::Windows
scenarioSelectWnd->UpdateParkPreview(preview);
});
}
else if (info.Type == FileType::scenario)
else
{
SourceDescriptor source{};
if (!ScenarioSources::TryGetByName(name, &source))
@@ -269,10 +268,6 @@ namespace OpenRCT2::Ui::Windows
_preview = preview;
}
else
{
return;
}
}
void UpdateParkPreview(const ParkPreview& preview)