Skip to content

Commit

Permalink
cleanup, ( thx Nick )
Browse files Browse the repository at this point in the history
  • Loading branch information
krazynez committed Jun 9, 2024
1 parent 466eda1 commit dd37a3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 6 additions & 4 deletions extras/menus/arkMenu/include/ark_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#define FIX_BOOLEAN(c) {c = (c)?1:0;}


enum{
DISABLED,
ALWAYS_ON,
Expand Down Expand Up @@ -489,6 +490,10 @@ settings_entry* ark_conf_entries_adr[] = {

std::vector<string> custom_config;

void cleanupSettings(){
custom_config.clear();
}

bool isComment(string line){
return (line[0] == '#' || line[0] == ';' || (line[0]=='/'&&line[1]=='/'));
}
Expand Down Expand Up @@ -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 ); ){
Expand Down Expand Up @@ -772,6 +777,3 @@ void saveSettings(){
output.close();
}

void cleanupSettings(){
custom_config.clear();
}
1 change: 0 additions & 1 deletion extras/menus/arkMenu/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit dd37a3a

Please sign in to comment.