File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -816,6 +816,29 @@ bool LLAppViewerWin32::reportCrashToBugsplat(void* pExcepInfo)
816
816
return false ;
817
817
}
818
818
819
+ bool LLAppViewerWin32::initWindow ()
820
+ {
821
+ // This is a workaround/hotfix for a change in Windows 11 24H2 (and possibly later)
822
+ // Where the window width and height need to correctly reflect an available FullScreen size
823
+ if (gSavedSettings .getBOOL (" FullScreen" ))
824
+ {
825
+ DEVMODE dev_mode;
826
+ ::ZeroMemory (&dev_mode, sizeof (DEVMODE));
827
+ dev_mode.dmSize = sizeof (DEVMODE);
828
+ if (EnumDisplaySettings (NULL , ENUM_CURRENT_SETTINGS, &dev_mode))
829
+ {
830
+ gSavedSettings .setU32 (" WindowWidth" , dev_mode.dmPelsWidth );
831
+ gSavedSettings .setU32 (" WindowHeight" , dev_mode.dmPelsHeight );
832
+ }
833
+ else
834
+ {
835
+ LL_WARNS (" AppInit" ) << " Unable to set WindowWidth and WindowHeight for FullScreen mode" << LL_ENDL;
836
+ }
837
+ }
838
+
839
+ return LLAppViewer::initWindow ();
840
+ }
841
+
819
842
void LLAppViewerWin32::initLoggingAndGetLastDuration ()
820
843
{
821
844
LLAppViewer::initLoggingAndGetLastDuration ();
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ class LLAppViewerWin32 : public LLAppViewer
46
46
bool reportCrashToBugsplat (void * pExcepInfo) override ;
47
47
48
48
protected:
49
+ bool initWindow () override ; // Override to initialize the viewer's window.
49
50
void initLoggingAndGetLastDuration () override ; // Override to clean stack_trace info.
50
51
void initConsole () override ; // Initialize OS level debugging console.
51
52
bool initHardwareTest () override ; // Win32 uses DX9 to test hardware.
You can’t perform that action at this time.
0 commit comments