diff options
author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-12-13 17:36:29 -0500 |
---|---|---|
committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-12-13 17:36:29 -0500 |
commit | e4f1f611a4736e4b0b78c0d61c3c5f576fec93d0 (patch) | |
tree | 87aeed34bc9378648e1b8729bacf8462b4d9ec2d /indra/llwindow/llwindowsdl.cpp | |
parent | 20bc02d2544320a5ad99c61b8d012608319e3161 (diff) | |
parent | d8aa31d10a89aa826cc549594c083a054a2ad967 (diff) |
merged .hgtags
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index e41aa9820f..8acb52516a 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; @@ -985,7 +988,6 @@ void LLWindowSDL::swapBuffers() { if (mWindow) { - glFinish(); SDL_GL_SwapBuffers(); } } @@ -1843,11 +1845,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 +1867,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) { |