summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-11-18 12:54:15 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-11-18 12:54:15 -0500
commit7ee4c04365407920fb938311e3c237f7af687cc4 (patch)
tree8c11ca25e7381555c16be9b227a8c960fb8c4430 /indra/llwindow
parente0759c82be89963c105fbc906ce219d1e922a636 (diff)
parent4bcdcd02fb7e83a2754084f2fb599b56ea6c8743 (diff)
merge
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowsdl.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index e41aa9820f..da2222ad51 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -63,6 +63,9 @@ extern BOOL gDebugWindowProc;
const S32 MAX_NUM_RESOLUTIONS = 200;
+const S32 MIN_WINDOW_WIDTH = 1024;
+const S32 MIN_WINDOW_HEIGHT = 768;
+
// static variable for ATI mouse cursor crash work-around:
static bool ATIbug = false;
@@ -1843,11 +1846,15 @@ void LLWindowSDL::gatherInput()
break;
case SDL_VIDEORESIZE: // *FIX: handle this?
+ {
llinfos << "Handling a resize event: " << event.resize.w <<
"x" << event.resize.h << llendl;
+ S32 width = llmax(event.resize.w, MIN_WINDOW_WIDTH);
+ S32 height = llmax(event.resize.h, MIN_WINDOW_HEIGHT);
+
// *FIX: I'm not sure this is necessary!
- mWindow = SDL_SetVideoMode(event.resize.w, event.resize.h, 32, mSDLFlags);
+ mWindow = SDL_SetVideoMode(width, height, 32, mSDLFlags);
if (!mWindow)
{
// *FIX: More informative dialog?
@@ -1861,9 +1868,9 @@ void LLWindowSDL::gatherInput()
break;
}
- mCallbacks->handleResize(this, event.resize.w, event.resize.h );
+ mCallbacks->handleResize(this, width, height);
break;
-
+ }
case SDL_ACTIVEEVENT:
if (event.active.state & SDL_APPINPUTFOCUS)
{