Compare commits

...

2 commits

Author SHA1 Message Date
Crementif
42ff3ad468 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.
2025-07-16 16:14:55 +02:00
Crementif
2d74bcfbfa Fix regression with saving/loading child configs
Seems like a minor thing slipped under the radar in commit 67de63bed6
2025-07-16 16:08:09 +02:00
3 changed files with 3 additions and 4 deletions

View file

@ -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(

View file

@ -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 });

View file

@ -136,7 +136,6 @@ void wxCemuConfig::Save(XMLConfigParser& config)
wpos.set<sint32>("y", window_position.y);
auto wsize = config.set("window_size");
wsize.set<sint32>("x", window_size.x);
cemu_assert_debug(window_size.x != 0);
wsize.set<sint32>("y", window_size.y);
config.set<bool>("window_maximized", window_maximized);