diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-09-10 23:30:52 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-09-10 23:30:52 +0300 |
commit | 49216183902045a2b9ba4a0627eb4298a65c004c (patch) | |
tree | d2c4e886bd0aa57e91d627c81f02fa0b2ece75a9 /indra/llwindow/llwindowwin32.cpp | |
parent | ff536ef9c2146a281f17ddcf7d20966774a0d02e (diff) | |
parent | e241670694959833feaa0e667222b337095eb683 (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 97cd31de81..e05f507506 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -741,6 +741,17 @@ void LLWindowWin32::restore() SetFocus(mWindowHandle); } +bool destroy_window_handler(HWND &hWnd) +{ + __try + { + return DestroyWindow(hWnd); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + return false; + } +} // close() destroys all OS-specific code associated with a window. // Usually called from LLWindowManager::destroyWindow() @@ -814,7 +825,7 @@ void LLWindowWin32::close() ShowWindow(mWindowHandle, SW_HIDE); // This causes WM_DESTROY to be sent *immediately* - if (!DestroyWindow(mWindowHandle)) + if (!destroy_window_handler(mWindowHandle)) { OSMessageBox(mCallbacks->translateString("MBDestroyWinFailed"), mCallbacks->translateString("MBShutdownErr"), @@ -4036,7 +4047,7 @@ void LLWindowWin32::setDPIAwareness() F32 LLWindowWin32::getSystemUISize() { - float scale_value = 0; + F32 scale_value = 1.f; HWND hWnd = (HWND)getPlatformWindow(); HDC hdc = GetDC(hWnd); HMONITOR hMonitor; |