From 9d7352022369a04d957028515d2468297422f5e7 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 3 Oct 2009 22:48:05 +0200 Subject: Added support for the "too fast" login error So that next time somebody encounters it, it doesn't turn up as "unknown error". --- src/resources/wallpaper.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/resources') diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index 5794cbbd..2c7395f0 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -18,7 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include "resources/wallpaper.h" @@ -31,6 +30,7 @@ #include #include +#include #define WALLPAPER_FOLDER "graphics/images/" #define WALLPAPER_BASE "login_wallpaper.png" @@ -110,7 +110,6 @@ std::string Wallpaper::getWallpaper(int width, int height) wallPaperVector.push_back(wp.filename); } - if (!wallPaperVector.empty()) { // If we've got more than one occurence of a valid wallpaper... @@ -118,7 +117,7 @@ std::string Wallpaper::getWallpaper(int width, int height) { // Return randomly a wallpaper between vector[0] and // vector[vector.size() - 1] - srand((unsigned)time(0)); + srand((unsigned) time(0)); return wallPaperVector [int(wallPaperVector.size() * rand() / (RAND_MAX + 1.0))]; } @@ -132,5 +131,4 @@ std::string Wallpaper::getWallpaper(int width, int height) // Return an empty string if everything else failed return std::string(); - } -- cgit v1.2.3-70-g09d2