Correct resetting some touch control parameters.

Fixes #20993
This commit is contained in:
Henrik Rydgård
2025-11-22 16:41:12 +01:00
parent 759d8498ca
commit e172cc1060
3 changed files with 6 additions and 8 deletions
+3 -5
View File
@@ -587,10 +587,6 @@ void TouchControlLayoutScreen::onFinish(DialogResult reason) {
g_Config.Save("TouchControlLayoutScreen::onFinish");
}
void TouchControlLayoutScreen::OnVisibility(UI::EventParams &e) {
screenManager()->push(new TouchControlVisibilityScreen(gamePath_));
}
void TouchControlLayoutScreen::OnReset(UI::EventParams &e) {
INFO_LOG(Log::G3D, "Resetting touch control layout to default.");
@@ -670,7 +666,9 @@ void TouchControlLayoutScreen::CreateViews() {
gridSize->SetEnabledPtr(&g_Config.bTouchSnapToGrid);
leftColumn->Add(mode_);
leftColumn->Add(new Choice(co->T("Customize")))->OnClick.Handle(this, &TouchControlLayoutScreen::OnVisibility);
leftColumn->Add(new Choice(co->T("Customize")))->OnClick.Add([this](UI::EventParams &e) {
screenManager()->push(new TouchControlVisibilityScreen(gamePath_));
});
leftColumn->Add(snap);
leftColumn->Add(gridSize);
leftColumn->Add(new Choice(di->T("Reset")))->OnClick.Handle(this, &TouchControlLayoutScreen::OnReset);