1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 23:33:04 +01:00

Fix #5603: Game fails on startup (#5604)

The game tries to use a ui context while setting up a platform environment. Let the platform environment be created before looking for the RCT2 directory. This is a bit hacky at the moment, but a necessary fix until it can be cleaned up.
This commit is contained in:
Ted John
2017-06-13 00:38:56 +01:00
committed by GitHub
parent cf6f497cde
commit f76ca6ea8b
4 changed files with 13 additions and 19 deletions

View File

@@ -170,6 +170,12 @@ namespace OpenRCT2
config_save_default();
}
if (!rct2_init_directories() || !rct2_startup_checks())
{
return false;
}
_env->SetBasePath(DIRBASE::RCT2, gRCT2AddressAppPath);
if (!gOpenRCT2Headless)
{
GetContext()->GetUiContext()->CreateWindow();