From 923616ccac5d84184a70ac4bd10ff35322802c8c Mon Sep 17 00:00:00 2001 From: adiblol Date: Sun, 30 Sep 2012 03:18:11 +0200 Subject: 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) --- src/app/app.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/app/app.cpp') 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(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) ) { -- cgit v1.2.3-1-g7c22