diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/resourcemanager.h | 1 | ||||
-rw-r--r-- | src/resources/wallpaper.cpp | 14 | ||||
-rw-r--r-- | src/resources/wallpaper.h | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index 17ce7cae..ec60fa9a 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -40,7 +40,6 @@ struct SDL_Surface; */ class ResourceManager { - friend class Resource; public: 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) diff --git a/src/resources/wallpaper.h b/src/resources/wallpaper.h index 96a655e8..fd501a83 100644 --- a/src/resources/wallpaper.h +++ b/src/resources/wallpaper.h @@ -24,8 +24,6 @@ #include <string> -#include <SDL_types.h> - /** * Handles organizing and choosing of wallpapers. */ |