diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-12 23:10:37 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-12 23:10:37 +0200 |
commit | 55fc460429899df2d976a11d4521eb2f6ab56367 (patch) | |
tree | 7cecc9f16227dc31a46b3d043a7f356eb8d16f63 /src/gui/gui.cpp | |
parent | 6fb4a7f6e0b793a0d3033e1ffdc31c115c8313eb (diff) | |
download | mana-55fc460429899df2d976a11d4521eb2f6ab56367.tar.gz mana-55fc460429899df2d976a11d4521eb2f6ab56367.tar.bz2 mana-55fc460429899df2d976a11d4521eb2f6ab56367.tar.xz mana-55fc460429899df2d976a11d4521eb2f6ab56367.zip |
Implemented scaling in OpenGL mode
The screen will be scaled up as much as possible, while keeping a
minimum 'virtual' resolution of 640x360.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 78fc42fb..e6e61f64 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -205,6 +205,9 @@ void Gui::draw() int mouseX, mouseY; Uint8 button = SDL_GetMouseState(&mouseX, &mouseY); + mouseX /= graphics->getScale(); + mouseY /= graphics->getScale(); + if ((Client::hasMouseFocus() || button & SDL_BUTTON(1)) && mCustomCursor && mMouseCursorAlpha > 0.0f) |