summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerwin32.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-03 21:25:03 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-03 21:25:03 +0800
commit9dee269eacd32c48627d3fcc243104a56f021bbc (patch)
treeb6418c111051e1ccebf0553e7ff667f917ea4c8d /indra/newview/llappviewerwin32.cpp
parentfa7a4a38d8e66121116d91d947c4ec807822912e (diff)
parentbca9ba9b7940f9e32fe9dd25fb64fa4f2fb407db (diff)
Merge tag 'Second_Life_Project#bca9ba9b-glTF_Mesh_Import' into gltf_mesh_import
Diffstat (limited to 'indra/newview/llappviewerwin32.cpp')
-rw-r--r--indra/newview/llappviewerwin32.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 67a44cfb27..f3214e2a20 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -832,6 +832,29 @@ bool LLAppViewerWin32::reportCrashToBugsplat(void* pExcepInfo)
return false;
}
+bool LLAppViewerWin32::initWindow()
+{
+ // This is a workaround/hotfix for a change in Windows 11 24H2 (and possibly later)
+ // Where the window width and height need to correctly reflect an available FullScreen size
+ if (gSavedSettings.getBOOL("FullScreen"))
+ {
+ DEVMODE dev_mode;
+ ::ZeroMemory(&dev_mode, sizeof(DEVMODE));
+ dev_mode.dmSize = sizeof(DEVMODE);
+ if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode))
+ {
+ gSavedSettings.setU32("WindowWidth", dev_mode.dmPelsWidth);
+ gSavedSettings.setU32("WindowHeight", dev_mode.dmPelsHeight);
+ }
+ else
+ {
+ LL_WARNS("AppInit") << "Unable to set WindowWidth and WindowHeight for FullScreen mode" << LL_ENDL;
+ }
+ }
+
+ return LLAppViewer::initWindow();
+}
+
void LLAppViewerWin32::initLoggingAndGetLastDuration()
{
LLAppViewer::initLoggingAndGetLastDuration();