Fix resetting the DisplayLayout

This commit is contained in:
Henrik Rydgård
2025-11-22 16:29:55 +01:00
parent 61302d5af0
commit 759d8498ca
+3 -5
View File
@@ -302,11 +302,9 @@ void DisplayLayoutScreen::CreateViews() {
rightColumn->Add(rotation);
Choice *center = new Choice(di->T("Reset"));
center->OnClick.Add([&config](UI::EventParams &) {
config.fDisplayAspectRatio = 1.0f;
config.fDisplayScale = 1.0f;
config.fDisplayOffsetX = 0.5f;
config.fDisplayOffsetY = 0.5f;
center->OnClick.Add([&config, portrait](UI::EventParams &) {
// Hm, not really ideal to have to use strings here.
config.ResetToDefault(portrait ? "DisplayLayout.Portrait" : "DisplayLayout.Landscape");
});
rightColumn->Add(center);