1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Ensure correct language is used for scan-objects

This commit is contained in:
Ted John
2018-04-20 00:12:40 +01:00
parent edb9dc39ab
commit 4ce4101ac5

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;
}