summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 33b4257706..1f3823509c 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -907,6 +907,10 @@ void LLWindowWin32::close()
}
});
+ // Window thread might be waiting for a getMessage(), give it
+ // a push to enshure it will process destroy_window_handler
+ kickWindowThread();
+
// Even though the above lambda might not yet have run, we've already
// bound mWindowHandle into it by value, which should suffice for the
// operations we're asking. That's the last time WE should touch it.
@@ -1251,9 +1255,9 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO
if (!DescribePixelFormat(mhDC, pixel_format, sizeof(PIXELFORMATDESCRIPTOR),
&pfd))
{
- close();
OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"),
mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
@@ -1290,42 +1294,42 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO
if (pfd.cColorBits < 32)
{
- close();
OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"),
mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
if (pfd.cAlphaBits < 8)
{
- close();
OSMessageBox(mCallbacks->translateString("MBAlpha"),
mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
if (!SetPixelFormat(mhDC, pixel_format, &pfd))
{
- close();
OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"),
mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
if (!(mhRC = SafeCreateContext(mhDC)))
{
- close();
OSMessageBox(mCallbacks->translateString("MBGLContextErr"),
mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
if (!wglMakeCurrent(mhDC, mhRC))
{
- close();
OSMessageBox(mCallbacks->translateString("MBGLContextActErr"),
mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
@@ -1532,16 +1536,16 @@ const S32 max_format = (S32)num_formats - 1;
if (!mhDC)
{
- close();
OSMessageBox(mCallbacks->translateString("MBDevContextErr"), mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
if (!SetPixelFormat(mhDC, pixel_format, &pfd))
{
- close();
OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"),
mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
@@ -1577,8 +1581,8 @@ const S32 max_format = (S32)num_formats - 1;
if (!DescribePixelFormat(mhDC, pixel_format, sizeof(PIXELFORMATDESCRIPTOR),
&pfd))
{
- close();
OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"), mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
@@ -1590,15 +1594,15 @@ const S32 max_format = (S32)num_formats - 1;
// make sure we have 32 bits per pixel
if (pfd.cColorBits < 32 || GetDeviceCaps(mhDC, BITSPIXEL) < 32)
{
- close();
OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"), mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
if (pfd.cAlphaBits < 8)
{
- close();
OSMessageBox(mCallbacks->translateString("MBAlpha"), mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
@@ -1614,8 +1618,8 @@ const S32 max_format = (S32)num_formats - 1;
if (!wglMakeCurrent(mhDC, mhRC))
{
- close();
OSMessageBox(mCallbacks->translateString("MBGLContextActErr"), mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}
@@ -1623,8 +1627,8 @@ const S32 max_format = (S32)num_formats - 1;
if (!gGLManager.initGL())
{
- close();
OSMessageBox(mCallbacks->translateString("MBVideoDrvErr"), mCallbacks->translateString("MBError"), OSMB_OK);
+ close();
return FALSE;
}