summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-18 13:52:07 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-18 13:52:07 +0800
commitc6048b2a8e18877f3f8bd0a7e190c553a3caa9a5 (patch)
tree5e5b921f08012b20a5ae940d4f8ac4bd95e2f444 /indra/llwindow/llwindowwin32.cpp
parent04081678eeaa1d56cecc1c68aa358d255addf81d (diff)
parent09a3bac9436af1b6077fb27885c8c6c645f40a8e (diff)
Merge branch 'main' into 2025.05
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index d237fdb334..725184eda4 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
@@ -570,6 +581,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
// Make an instance of our window then define the window class
mhInstance = GetModuleHandle(NULL);
+#if !_M_ARM64
// Init Direct Input - needed for joystick / Spacemouse
LPDIRECTINPUT8 di8_interface;
@@ -584,6 +596,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
{
gDirectInput8 = di8_interface;
}
+#endif
mSwapMethod = SWAP_METHOD_UNDEFINED;