From dd37a3a2a2fb0799d5564b4536609d0a0bce84a3 Mon Sep 17 00:00:00 2001 From: Brennen Murphy Date: Sat, 8 Jun 2024 22:55:03 -0400 Subject: [PATCH] cleanup, ( thx Nick ) --- extras/menus/arkMenu/include/ark_settings.h | 10 ++++++---- extras/menus/arkMenu/main.cpp | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/extras/menus/arkMenu/include/ark_settings.h b/extras/menus/arkMenu/include/ark_settings.h index 0c74266ad..e97f863ad 100644 --- a/extras/menus/arkMenu/include/ark_settings.h +++ b/extras/menus/arkMenu/include/ark_settings.h @@ -4,6 +4,7 @@ #define FIX_BOOLEAN(c) {c = (c)?1:0;} + enum{ DISABLED, ALWAYS_ON, @@ -489,6 +490,10 @@ settings_entry* ark_conf_entries_adr[] = { std::vector custom_config; +void cleanupSettings(){ + custom_config.clear(); +} + bool isComment(string line){ return (line[0] == '#' || line[0] == ';' || (line[0]=='/'&&line[1]=='/')); } @@ -683,7 +688,7 @@ void loadSettings(){ } } - + cleanupSettings(); std::ifstream input((string(ark_config->arkpath)+"SETTINGS.TXT").c_str()); for( std::string line; getline( input, line ); ){ @@ -772,6 +777,3 @@ void saveSettings(){ output.close(); } -void cleanupSettings(){ - custom_config.clear(); -} diff --git a/extras/menus/arkMenu/main.cpp b/extras/menus/arkMenu/main.cpp index aa525f0b4..a04c50bb5 100644 --- a/extras/menus/arkMenu/main.cpp +++ b/extras/menus/arkMenu/main.cpp @@ -103,7 +103,6 @@ int main(int argc, char** argv){ int max_settings = MAX_SETTINGS_OPTIONS; if (common::getPspModel() != PSP_GO) max_settings -= 2; SettingsTable stab = { settings_entries, max_settings }; - settings_menu->setCallbacks(NULL, saveSettings, cleanupSettings); entries[n_entries++] = new SettingsMenu(&stab, common::saveConf, false, true, true); if (recovery){