summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-28 14:30:10 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-09 23:45:11 +0100
commit8aeb42b16430c85e4bc4052d881b8335d4a2ff36 (patch)
treeb2c3deb9a722bcff49192578995ae7182a711cda /src/game.cpp
parent011f69af465085bd8555737a3297f0e070040128 (diff)
downloadmana-8aeb42b16430c85e4bc4052d881b8335d4a2ff36.tar.gz
mana-8aeb42b16430c85e4bc4052d881b8335d4a2ff36.tar.bz2
mana-8aeb42b16430c85e4bc4052d881b8335d4a2ff36.tar.xz
mana-8aeb42b16430c85e4bc4052d881b8335d4a2ff36.zip
Allow changing fullscreen resolution without restart
Unified Graphics:setFullscreen and Graphics:resize into a single Graphics:changeVideoMode function that tries to restore the existing mode when changing to the new mode didn't work, and exists with an error when that also fails. Split up handling of SDL_VIDEORESIZE and the adapting to new resolution in the Client class, so that the second part could also be called when changing resolution fullscreen mode. The Video tab in the Setup window now also filters out any modes smaller than 640x480 since the game won't properly adapt to that resolution anyway. Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 99d40647..222e56df 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -401,7 +401,7 @@ void Game::handleInput()
if (event.type == SDL_VIDEORESIZE)
{
// Let the client deal with this one (it'll pass down from there)
- Client::instance()->resizeVideo(event.resize.w, event.resize.h);
+ Client::instance()->handleVideoResize(event.resize.w, event.resize.h);
}
// Keyboard events (for discontinuous keys)
else if (event.type == SDL_KEYDOWN)