diff options
| author | in1tiate <radwoodward@vikings.grayson.edu> | 2021-05-16 00:41:41 -0500 |
|---|---|---|
| committer | in1tiate <radwoodward@vikings.grayson.edu> | 2021-05-16 00:41:41 -0500 |
| commit | 167aae750f969cf00f64216ce7839366793c294f (patch) | |
| tree | 7cd2b43b77d9246c8b75539ece53d1258e3020f9 /src/text_file_functions.cpp | |
| parent | bea9fc1a0587cfafed43837543f9db30e515632f (diff) | |
account for both theme and misc pathing which are different because this program is well made and does not make me want to pull my hair out
Diffstat (limited to 'src/text_file_functions.cpp')
| -rw-r--r-- | src/text_file_functions.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 712a63de..1d36689f 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -868,10 +868,13 @@ QString AOApplication::get_effect(QString effect, QString p_char, if (p_folder == "") p_folder = read_char_ini(p_char, "effects", "Options"); - QString p_path = get_image("effects/" + effect, current_theme, get_subtheme(), default_theme, p_folder); + QString p_path = get_image("effects/" + effect, current_theme, get_subtheme(), default_theme, ""); + QString p_misc_path = get_image(effect, current_theme, get_subtheme(), default_theme, p_folder); - if (!file_exists(p_path)) + if (!file_exists(p_misc_path) && !file_exists(p_path)) return ""; + else if (file_exists(p_misc_path)) + return p_misc_path; return p_path; } @@ -884,7 +887,9 @@ QString AOApplication::get_effect_property(QString fx_name, QString p_char, else f_property = fx_name + "_" + p_property; - QString f_result = get_config_value(f_property, "effects/effects.ini", current_theme, get_subtheme(), default_theme, read_char_ini(p_char, "effects", "Options")); + QString f_result = get_config_value(f_property, "effects.ini", current_theme, get_subtheme(), default_theme, read_char_ini(p_char, "effects", "Options")); + if (f_result == "") + f_result = get_config_value(f_property, "effects/effects.ini", current_theme, get_subtheme(), default_theme, ""); if (fx_name == "realization" && p_property == "sound") { f_result = get_custom_realization(p_char); } |
