summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-01-19 01:13:29 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-01-19 01:13:29 +0100
commit0aa2c1373944b6d82793b91de744ce81d114474e (patch)
tree3ad7c841ee38b0c0980ffe3552c9e6a9bad9c613
parent10e5f2e1d88897c16f2ce5e2ef26898ae05ab9ef (diff)
downloadmana-0aa2c1373944b6d82793b91de744ce81d114474e.tar.gz
mana-0aa2c1373944b6d82793b91de744ce81d114474e.tar.bz2
mana-0aa2c1373944b6d82793b91de744ce81d114474e.tar.xz
mana-0aa2c1373944b6d82793b91de744ce81d114474e.zip
Fix the wallpapers loading broken logic.
Trivial.
-rw-r--r--src/resources/wallpaper.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 22bbda9c..c8857745 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -55,9 +55,7 @@ static void initDefaultWallpaperPaths()
// Init the path
wallpaperPath = branding.getValue("wallpapersPath", "");
- if (!wallpaperPath.empty() && resman->isDirectory(wallpaperPath))
- return;
- else
+ if (wallpaperPath.empty() || !resman->isDirectory(wallpaperPath))
wallpaperPath = paths.getValue("wallpapers", "");
if (wallpaperPath.empty() || !resman->isDirectory(wallpaperPath))
@@ -66,12 +64,12 @@ static void initDefaultWallpaperPaths()
// Init the default file
wallpaperFile = branding.getValue("wallpaperFile", "");
- if (!wallpaperFile.empty() && resman->isDirectory(wallpaperFile))
+ if (!wallpaperFile.empty() && !resman->isDirectory(wallpaperFile))
return;
else
wallpaperFile = paths.getValue("wallpaperFile", "");
- if (wallpaperFile.empty() || !resman->isDirectory(wallpaperFile))
+ if (wallpaperFile.empty() || resman->isDirectory(wallpaperFile))
wallpaperFile = "login_wallpaper.png";
}