diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-10 01:33:45 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-10 01:33:45 +0200 |
commit | b4ebdcf0622ce297704887cf0d653079a1fbcf1e (patch) | |
tree | 0cb030bb5f343054305179c2161dd904e2140822 /src/resources/wallpaper.cpp | |
parent | e36861eaef6f178543bd1029809da3ce1bab0e55 (diff) | |
download | mana-b4ebdcf0622ce297704887cf0d653079a1fbcf1e.tar.gz mana-b4ebdcf0622ce297704887cf0d653079a1fbcf1e.tar.bz2 mana-b4ebdcf0622ce297704887cf0d653079a1fbcf1e.tar.xz mana-b4ebdcf0622ce297704887cf0d653079a1fbcf1e.zip |
Introduced a Desktop widget to handle the wallpaper
Cleans up main.cpp a little.
Diffstat (limited to 'src/resources/wallpaper.cpp')
-rw-r--r-- | src/resources/wallpaper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index 07f6ecb6..5e9aa008 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -53,20 +53,20 @@ bool wallpaperCompare(WallpaperSize a, WallpaperSize b) void Wallpaper::loadWallpapers() { - char **imgs = PHYSFS_enumerateFiles(WALLPAPER_FOLDER); - char **i; - size_t baseLen = strlen(WALLPAPER_BASE); - int width; - int height; - wallpaperSizes.clear(); + size_t baseLen = strlen(WALLPAPER_BASE); haveBackup = false; - for (i = imgs; *i != NULL; i++) + char **imgs = PHYSFS_enumerateFiles(WALLPAPER_FOLDER); + + for (char **i = imgs; *i != NULL; i++) { if (strncmp(*i, WALLPAPER_BASE, baseLen) == 0) { + int width; + int height; + if (strlen(*i) == baseLen + 4) { if (haveBackup) |