mirror of https://github.com/OpenRCT2/OpenRCT2.git
Ensure correct language is used for scan-objects
This commit is contained in:
parent
edb9dc39ab
commit
4ce4101ac5
|
@ -397,12 +397,13 @@ static exitcode_t HandleCommandScanObjects(CommandLineArgEnumerator * enumerator
|
||||||
|
|
||||||
gOpenRCT2Headless = true;
|
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 context = std::unique_ptr<OpenRCT2::IContext>(OpenRCT2::CreateContext());
|
||||||
auto env = context->GetPlatformEnvironment();
|
auto env = context->GetPlatformEnvironment();
|
||||||
auto objectRepository = std::unique_ptr<IObjectRepository>(CreateObjectRepository(env));
|
auto objectRepository = std::unique_ptr<IObjectRepository>(CreateObjectRepository(env));
|
||||||
|
|
||||||
|
// HACK: set gCurrentLanguage otherwise it be wrong for the index file
|
||||||
|
gCurrentLanguage = gConfigGeneral.language;
|
||||||
|
|
||||||
objectRepository->Construct();
|
objectRepository->Construct();
|
||||||
return EXITCODE_OK;
|
return EXITCODE_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue