From 2d74bcfbfa3034f8db1e1f5e3a7d58e4013bfe65 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:06:39 +0200 Subject: [PATCH 1/2] Fix regression with saving/loading child configs Seems like a minor thing slipped under the radar in commit 67de63bed6c54ee158380f683a65874fc0a993ff --- src/config/XMLConfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/XMLConfig.h b/src/config/XMLConfig.h index 2e46b8db..ea9cca82 100644 --- a/src/config/XMLConfig.h +++ b/src/config/XMLConfig.h @@ -480,8 +480,8 @@ class XMLChildConfig { m_parentConfig = { .lock = [getParentConfig]() { return getParentConfig().Lock(); }, - .save = [getParentConfig]() { return getParentConfig().Load(); }, - .load = [getParentConfig]() { return getParentConfig().Save(); }, + .save = [getParentConfig]() { return getParentConfig().Save(); }, + .load = [getParentConfig]() { return getParentConfig().Load(); }, }; auto configParser = std::make_pair( From 42ff3ad4683647cf82b616e1990a0df855282c59 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:14:55 +0200 Subject: [PATCH 2/2] Fix debug assert that'd occur when closing the debug menu Closing the settings window will immediately flush a temporary 0, 0 value it writes for the size which gets overwritten by the MainWindow a few seconds later. In the code, -1 is considered the "off" state, and 0 is considered a "it should be saved, but only whenever the value is available". The save gamepad size/pos option already worked like this new behavior, since you might enable the option but not (previously) have it open yet. When encountering a 0 as the size, it'll just use the default window size of Cemu. --- src/gui/wxgui/MainWindow.cpp | 2 +- src/gui/wxgui/wxCemuConfig.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/wxgui/MainWindow.cpp b/src/gui/wxgui/MainWindow.cpp index c1826ae5..bdc0db20 100644 --- a/src/gui/wxgui/MainWindow.cpp +++ b/src/gui/wxgui/MainWindow.cpp @@ -1299,7 +1299,7 @@ void MainWindow::LoadSettings() if (config.window_position != Vector2i{ -1,-1 }) this->SetPosition({ config.window_position.x, config.window_position.y }); - if (config.window_size != Vector2i{ -1,-1 }) + if (config.window_size.x > 0 && config.window_size.y > 0) { this->SetSize({ config.window_size.x, config.window_size.y }); diff --git a/src/gui/wxgui/wxCemuConfig.cpp b/src/gui/wxgui/wxCemuConfig.cpp index 87355797..e6a2b469 100644 --- a/src/gui/wxgui/wxCemuConfig.cpp +++ b/src/gui/wxgui/wxCemuConfig.cpp @@ -136,7 +136,6 @@ void wxCemuConfig::Save(XMLConfigParser& config) wpos.set("y", window_position.y); auto wsize = config.set("window_size"); wsize.set("x", window_size.x); - cemu_assert_debug(window_size.x != 0); wsize.set("y", window_size.y); config.set("window_maximized", window_maximized);