From 723ee78f479f61a8b15381dcfa8cea70344eaed9 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 17 Sep 2020 19:34:21 -0400 Subject: [PATCH] ViewManager: Hack for loading Trilogy projects --- Editor/ViewManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index fdcf413cf..553b2a88e 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -160,7 +160,12 @@ void ViewManager::RootSpaceViewBuilt(specter::View* view) { void ViewManager::ProjectChanged(hecl::Database::Project& proj) { CDvdFile::Shutdown(); - CDvdFile::Initialize(hecl::ProjectPath(proj.getProjectWorkingPath(), _SYS_STR("out/files"))); + // FIXME trilogy hack + hecl::ProjectPath projectPath(proj.getProjectWorkingPath(), _SYS_STR("out/files/MP1")); + if (!projectPath.isDirectory()) { + projectPath = hecl::ProjectPath(proj.getProjectWorkingPath(), _SYS_STR("out/files")); + } + CDvdFile::Initialize(projectPath); } void ViewManager::SetupEditorView() {