diff options
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) |