diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-06-24 17:25:25 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-06-24 17:25:25 +0800 |
commit | a20bf9a72365142e6a534180c375221c100d7c54 (patch) | |
tree | d61346da0fe492a2a82f0673d49ad298eb990b3a /indra/llwindow/llwindowwin32.cpp | |
parent | d1353441f91d5776e1f4e72666f7c9de96eecca5 (diff) | |
parent | 09615bb5160d6ab67f027409ec6be25336842ab7 (diff) |
Merge branch 'main' into gltf_mesh_import
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index a781e638ee..4fca74497f 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -160,7 +160,18 @@ HGLRC SafeCreateContext(HDC &hdc) GLuint SafeChoosePixelFormat(HDC &hdc, const PIXELFORMATDESCRIPTOR *ppfd) { - return LL::seh::catcher([hdc, ppfd]{ return ChoosePixelFormat(hdc, ppfd); }); + __try + { + return ChoosePixelFormat(hdc, ppfd); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + // convert to C++ styled exception + // C exception don't allow classes, so it's a regular char array + char integer_string[32]; + sprintf(integer_string, "SEH, code: %lu\n", GetExceptionCode()); + throw std::exception(integer_string); + } } //static |