Callback -> lambda (cleanup)

This commit is contained in:
Henrik Rydgård committed 2023-08-30 23:30:23 +02:00
1 parent 318ef7ccab
commit ab58827ed6
2 files changed
+4 -7

No files matched your search

+4 -6
View File
@@ -319,7 +319,10 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings)
max_res_temp = 4; // At least allow 2x
int max_res = std::min(max_res_temp, (int)ARRAY_SIZE(deviceResolutions));
UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gr->T("Display Resolution (HW scaler)"), deviceResolutions, 0, max_res, I18NCat::GRAPHICS, screenManager()));
hwscale->OnChoice.Handle(this, &GameSettingsScreen::OnHwScaleChange); // To refresh the display mode
hwscale->OnChoice.Add([](UI::EventParams &) {
System_RecreateActivity();
return UI::EVENT_DONE;
});
}
#endif
@@ -1333,11 +1336,6 @@ UI::EventReturn GameSettingsScreen::OnResolutionChange(UI::EventParams &e) {
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnHwScaleChange(UI::EventParams &e) {
System_RecreateActivity();
return UI::EVENT_DONE;
}
void GameSettingsScreen::onFinish(DialogResult result) {
Reporting::Enable(enableReports_, "report.ppsspp.org");
Reporting::UpdateConfig();