Ensure correct language is used for scan-objects

This commit is contained in:
Ted John committed 2018-04-20 00:12:40 +01:00
1 parent edb9dc39ab
commit 4ce4101ac5
1 file changed
+4 -3
+4 -3
View File
@@ -397,12 +397,13 @@ static exitcode_t HandleCommandScanObjects(CommandLineArgEnumerator * enumerator
gOpenRCT2Headless = true;
// HACK: set gCurrentLanguage otherwise it be wrong for the index file
gCurrentLanguage = gConfigGeneral.language;
auto context = std::unique_ptr<OpenRCT2::IContext>(OpenRCT2::CreateContext());
auto env = context->GetPlatformEnvironment();
auto objectRepository = std::unique_ptr<IObjectRepository>(CreateObjectRepository(env));
// HACK: set gCurrentLanguage otherwise it be wrong for the index file
gCurrentLanguage = gConfigGeneral.language;
objectRepository->Construct();
return EXITCODE_OK;
}