summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 700e5676..5159712e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -920,7 +920,16 @@ int main(int argc, char *argv[])
}
}
- graphics->drawImage(login_wallpaper, 0, 0);
+ if (graphics->getWidth() > login_wallpaper->getWidth() ||
+ graphics->getHeight() > login_wallpaper->getHeight())
+ {
+ graphics->setColor(gcn::Color(64, 64, 64));
+ graphics->fillRectangle(gcn::Rectangle(
+ 0, 0, graphics->getWidth(), graphics->getHeight()));
+ }
+ graphics->drawImage(login_wallpaper,
+ (graphics->getWidth() - login_wallpaper->getWidth()) / 2,
+ (graphics->getHeight() - login_wallpaper->getHeight()) / 2);
gui->draw();
graphics->updateScreen();