aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/path_functions.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/path_functions.cpp b/src/path_functions.cpp
index 575461f0..a8aae2e2 100644
--- a/src/path_functions.cpp
+++ b/src/path_functions.cpp
@@ -278,8 +278,13 @@ QString AOApplication::get_image(QString p_element, QString p_theme, QString p_s
QString AOApplication::get_sfx(QString p_sfx, QString p_misc, QString p_character)
{
- QVector<VPath> pathlist = get_asset_paths(p_sfx, current_theme, get_subtheme(), default_theme, p_misc, p_character);
- pathlist += get_sounds_path(p_sfx); // Sounds folder path
+ QVector<VPath> pathlist;
+ // Sounds subfolder is prioritized for organization sake
+ pathlist += get_asset_paths("sounds/" + p_sfx, current_theme, get_subtheme(), default_theme, p_misc, p_character);
+ // If sound subfolder not found, search just for SFX
+ pathlist += get_asset_paths(p_sfx, current_theme, get_subtheme(), default_theme, p_misc, p_character);
+ // If SFX not found, search base/sounds/general/ folder
+ pathlist += get_sounds_path(p_sfx);
QString ret = get_sfx_path(pathlist);
if (ret.isEmpty()) {
qWarning().nospace() << "could not find sfx " << p_sfx