make DOLFileIndex support both compressed and uncompressed files simultaneously

This commit is contained in:
Martin Michelsen
2023-08-26 21:00:01 -07:00
parent 1d0c0088d6
commit d93866146a
5 changed files with 23 additions and 50 deletions
+1 -8
View File
@@ -25,7 +25,6 @@ ServerState::ServerState(const char* config_filename, bool is_replay)
item_tracking_enabled(true),
drops_enabled(true),
episode_3_send_function_call_enabled(false),
enable_dol_compression(false),
catch_handler_exceptions(true),
ep3_behavior_flags(0),
run_shell_behavior(RunShellBehavior::DEFAULT),
@@ -663,12 +662,6 @@ void ServerState::parse_config(shared_ptr<const JSONObject> config_json) {
this->episode_3_send_function_call_enabled = false;
}
try {
this->enable_dol_compression = d.at("CompressDOLFiles")->as_bool();
} catch (const out_of_range&) {
this->enable_dol_compression = false;
}
try {
this->catch_handler_exceptions = d.at("CatchHandlerExceptions")->as_bool();
} catch (const out_of_range&) {
@@ -921,5 +914,5 @@ void ServerState::compile_functions() {
void ServerState::load_dol_files() {
config_log.info("Loading DOL files");
this->dol_file_index.reset(new DOLFileIndex("system/dol", this->enable_dol_compression));
this->dol_file_index.reset(new DOLFileIndex("system/dol"));
}