File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
SerialPrograms/Source/NintendoSwitch/Controllers Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 77#include < chrono>
88#include " Common/CRC32.h"
99#include " CommonFramework/Logging/Logger.h"
10+ // #include "CommonFramework/PersistentSettings.h"
11+ #include " CommonFramework/Panels/PanelTools.h"
12+ #include " NintendoSwitch/NintendoSwitch_Settings.h"
1013#include " NintendoSwitch_ControllerSettings.h"
1114
1215// #include <iostream>
@@ -478,6 +481,12 @@ ControllerProfile ControllerSettingsTable::get_or_make_profile(
478481 row->set_profile (profile);
479482
480483 this ->append_row (std::move (row));
484+ // PERSISTENT_SETTINGS().write();
485+
486+ // This is brutal (tech-debt). The only way to force the settings to save
487+ // is to load the panel. TODO: Redesign panels to allow external editing.
488+ // This is also coming in from a different thread (not the main Qt thread).
489+ PanelDescriptorWrapper<ConsoleSettings_Descriptor, ConsoleSettingsPanel>().make_panel ()->save_settings ();
481490
482491 return profile;
483492}
You can’t perform that action at this time.
0 commit comments