summaryrefslogtreecommitdiffstats
path: root/src/app/app.cpp
diff options
context:
space:
mode:
authoradiblol <adiblol@hydrogen>2012-09-30 03:18:11 +0200
committeradiblol <adiblol@hydrogen>2012-09-30 03:18:11 +0200
commit923616ccac5d84184a70ac4bd10ff35322802c8c (patch)
treec6bb91cc1839810c351c0739658ef10eba0181f7 /src/app/app.cpp
parentc36d0c8ed24775babd875e5f1ff7083e85fb2191 (diff)
downloadcolobot-923616ccac5d84184a70ac4bd10ff35322802c8c.tar.gz
colobot-923616ccac5d84184a70ac4bd10ff35322802c8c.tar.bz2
colobot-923616ccac5d84184a70ac4bd10ff35322802c8c.zip
Dirty hack to allow window resizing or even full screen.
Currently makes text buggy! (full screen must be initiated by window manager, for example Alt+F11 in Fluxbox)
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r--src/app/app.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index d6fc2dd..c703d7f 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -873,6 +873,13 @@ Event CApplication::ProcessSystemEvent()
{
event.type = EVENT_QUIT;
}
+ else if ( m_private->currentEvent.type == SDL_VIDEORESIZE ) {
+ m_deviceConfig.size.x = m_private->currentEvent.resize.w;
+ m_deviceConfig.size.y = m_private->currentEvent.resize.h;
+ CreateVideoSurface();
+ // FIXME: dirty hack, will fail with device other than OpenGL
+ dynamic_cast<Gfx::CGLDevice*>(m_device)->ResizeViewport(m_deviceConfig.size.x, m_deviceConfig.size.y);
+ }
else if ( (m_private->currentEvent.type == SDL_KEYDOWN) ||
(m_private->currentEvent.type == SDL_KEYUP) )
{