diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-01-28 14:30:10 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-02-09 23:45:11 +0100 |
commit | 8aeb42b16430c85e4bc4052d881b8335d4a2ff36 (patch) | |
tree | b2c3deb9a722bcff49192578995ae7182a711cda /src/client.h | |
parent | 011f69af465085bd8555737a3297f0e070040128 (diff) | |
download | mana-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/client.h')
-rw-r--r-- | src/client.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client.h b/src/client.h index e526b609..2ee6764c 100644 --- a/src/client.h +++ b/src/client.h @@ -203,7 +203,16 @@ public: void event(Event::Channel channel, const Event &event); void action(const gcn::ActionEvent &event); - void resizeVideo(int width, int height); + /** + * Should be called after the window has been resized by the user. + */ + void handleVideoResize(int width, int height); + + /** + * Should be called after a succesful resize or change of resolution, makes + * sure the GUI and game adapt to the new size. + */ + void videoResized(int width, int height); private: void initRootDir(); |