Skip to content

Commit 5987a02

Browse files
committed
adds a few mprintf's to write controlconfigdefaults.tbl debug messages
1 parent 862d11d commit 5987a02

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

code/controlconfig/controlsconfigcommon.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,10 @@ void control_config_common_load_overrides()
798798
LoadEnumsIntoMaps();
799799

800800
if (cf_exists_full("controlconfigdefaults.tbl", CF_TYPE_TABLES)) {
801+
mprintf(("Found controlconfigdefaults.tbl\n"));
801802
read_file_text("controlconfigdefaults.tbl", CF_TYPE_TABLES);
802803
} else {
804+
mprintf(("Didn't find controlconfigdefaults.tbl, using hardcoded values\n"));
803805
read_file_text_from_array(defaults_get_file("controlconfigdefaults.tbl"));
804806
}
805807

@@ -815,8 +817,10 @@ void control_config_common_load_overrides()
815817
SCP_string preset_name;
816818
if (optional_string("$Name:")) {
817819
stuff_string_line(preset_name);
820+
mprintf((" Found preset %s\n", preset_name.c_str()));
818821
} else {
819822
preset_name = "<unnamed preset>";
823+
mprintf((" Found unnamed preset\n"));
820824
}
821825
Control_config_preset_names.push_back(preset_name);
822826

@@ -888,9 +892,13 @@ void control_config_common_load_overrides()
888892

889893
if (optional_string("+Disable")) {
890894
r_ccConfig.disabled = true;
895+
mprintf((" Deprecated option '+Disable' found. Please use '$Disable: true' instead\n"));
896+
mprintf((" Bind '%s' was disabled\n", r_ccConfig.text));
891897
}
898+
892899
if (optional_string("$Disable:")) {
893900
stuff_boolean(&r_ccConfig.disabled);
901+
mprintf((" Bind '%s' was %s\n", r_ccConfig.text, (r_ccConfig.disabled == true) ? "disabled" : "enabled"));
894902
}
895903

896904
// Nerf the buffer now.

0 commit comments

Comments
 (0)