mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Callback -> lambda (cleanup)
This commit is contained in:
parent
318ef7ccab
commit
ab58827ed6
2 changed files with 4 additions and 7 deletions
|
@ -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();
|
||||
|
|
|
@ -96,7 +96,6 @@ private:
|
|||
UI::EventReturn OnFullscreenChange(UI::EventParams &e);
|
||||
UI::EventReturn OnFullscreenMultiChange(UI::EventParams &e);
|
||||
UI::EventReturn OnResolutionChange(UI::EventParams &e);
|
||||
UI::EventReturn OnHwScaleChange(UI::EventParams &e);
|
||||
UI::EventReturn OnRestoreDefaultSettings(UI::EventParams &e);
|
||||
UI::EventReturn OnRenderingBackend(UI::EventParams &e);
|
||||
UI::EventReturn OnRenderingDevice(UI::EventParams &e);
|
||||
|
|
Loading…
Add table
Reference in a new issue