summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-03 22:48:05 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-03 22:54:04 +0200
commit9d7352022369a04d957028515d2468297422f5e7 (patch)
treec74dd3f18610f004656944e793a93ed08284a7ba /src/resources
parentc18aa95dc6b44337c4ab63d9d892af6eb1f5a679 (diff)
downloadmana-client-9d7352022369a04d957028515d2468297422f5e7.tar.gz
mana-client-9d7352022369a04d957028515d2468297422f5e7.tar.bz2
mana-client-9d7352022369a04d957028515d2468297422f5e7.tar.xz
mana-client-9d7352022369a04d957028515d2468297422f5e7.zip
Added support for the "too fast" login error
So that next time somebody encounters it, it doesn't turn up as "unknown error".
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/wallpaper.cpp6
1 files changed, 2 insertions, 4 deletions
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 <time.h>
#include "resources/wallpaper.h"
@@ -31,6 +30,7 @@
#include <vector>
#include <physfs.h>
+#include <time.h>
#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();
-
}