android: native: Set game specific settings before initializing core.

- Allows some other settings to be overridden.
This commit is contained in:
bunnei 2020-05-26 18:37:34 -04:00 committed by xperia64
parent 5d2200bf45
commit 2d9e133275

View File

@ -128,6 +128,14 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
// Forces a config reload on game boot, if the user changed settings in the UI
Config{};
// Replace with game-specific settings
u64 program_id{};
FileUtil::SetCurrentRomPath(filepath);
auto app_loader = Loader::GetLoader(filepath);
if (app_loader) {
app_loader->ReadProgramId(program_id);
GameSettings::LoadOverrides(program_id);
}
Settings::Apply();
Camera::RegisterFactory("image", std::make_unique<Camera::StillImage::Factory>());
@ -152,12 +160,6 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
return load_result;
}
// Replace with game-specific settings
u64 program_id{};
system.GetAppLoader().ReadProgramId(program_id);
GameSettings::LoadOverrides(program_id);
Settings::Apply();
auto& telemetry_session = Core::System::GetInstance().TelemetrySession();
telemetry_session.AddField(Telemetry::FieldType::App, "Frontend", "SDL");