Skip to content

Commit

Permalink
Fixed readding known game with inferno cache, when saving settings vi…
Browse files Browse the repository at this point in the history
…a CL
  • Loading branch information
krazynez committed Dec 28, 2024
1 parent 0003fc5 commit 4c1a5b1
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions extras/menus/arkMenu/include/ark_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,27 @@ void saveSettings(){
for (int i=0; i<custom_config.size(); i++){
output << custom_config[i] << endl;
}

output.close();

std::ifstream input((string(ark_config->arkpath)+ARK_SETTINGS).c_str());
std::string line;
bool exist = false;
while(std::getline(input, line)) {
if(line == "ULUS10201, infernocache, off") {
exist = true;
break;
}
}
input.close();
if(exist == false) {
std::ofstream output((string(ark_config->arkpath)+ARK_SETTINGS).c_str());
output << "# Luxor doesn't like Inferno Cache" << endl;
output << "ULUS10201, infernocache, off" << endl;
output.close();
}


}

void resetSettings() {
Expand All @@ -800,31 +819,9 @@ void resetSettings() {
cfw_config.qaflags = 1;
cfw_config.vshregion = 0;
cfw_config.regionchange = 0;

/*switch (cfw_config.regionchange){
case REGION_JAPAN:
output << "vsh, region_jp, on" << endl;
break;
case REGION_AMERICA:
output << "vsh, region_us, on" << endl;
break;
case REGION_EUROPE:
output << "vsh, region_eu, on" << endl;
break;
}
if (cfw_config.vshregion > 0){
char tmp[10];
snprintf(tmp, 10, "%d", cfw_config.vshregion);
output << "vsh, fakeregion_" << tmp << ", on" << endl;
}

for (int i=0; i<custom_config.size(); i++){
output << custom_config[i] << endl;
}
*/

saveSettings();

saveSettings();


}
Expand Down

0 comments on commit 4c1a5b1

Please sign in to comment.