@@ -690,8 +690,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
690
690
}
691
691
692
692
if (dev_mode.dmPelsWidth == width &&
693
- dev_mode.dmPelsHeight == height &&
694
- dev_mode.dmBitsPerPel == BITS_PER_PIXEL)
693
+ dev_mode.dmPelsHeight == height)
695
694
{
696
695
success = true ;
697
696
if ((dev_mode.dmDisplayFrequency - current_refresh)
@@ -731,7 +730,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
731
730
// If we found a good resolution, use it.
732
731
if (success)
733
732
{
734
- success = setDisplayResolution (width, height, BITS_PER_PIXEL, closest_refresh);
733
+ success = setDisplayResolution (width, height, closest_refresh);
735
734
}
736
735
737
736
// Keep a copy of the actual current device mode in case we minimize
@@ -744,7 +743,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
744
743
mFullscreen = true ;
745
744
mFullscreenWidth = dev_mode.dmPelsWidth ;
746
745
mFullscreenHeight = dev_mode.dmPelsHeight ;
747
- mFullscreenBits = dev_mode.dmBitsPerPel ;
748
746
mFullscreenRefresh = dev_mode.dmDisplayFrequency ;
749
747
750
748
LL_INFOS (" Window" ) << " Running at " << dev_mode.dmPelsWidth
@@ -758,7 +756,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
758
756
mFullscreen = false ;
759
757
mFullscreenWidth = -1 ;
760
758
mFullscreenHeight = -1 ;
761
- mFullscreenBits = -1 ;
762
759
mFullscreenRefresh = -1 ;
763
760
764
761
std::map<std::string,std::string> args;
@@ -1175,7 +1172,7 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo
1175
1172
// If we found a good resolution, use it.
1176
1173
if (success)
1177
1174
{
1178
- success = setDisplayResolution (width, height, BITS_PER_PIXEL, closest_refresh);
1175
+ success = setDisplayResolution (width, height, closest_refresh);
1179
1176
}
1180
1177
1181
1178
// Keep a copy of the actual current device mode in case we minimize
@@ -1187,7 +1184,6 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo
1187
1184
mFullscreen = true ;
1188
1185
mFullscreenWidth = dev_mode.dmPelsWidth ;
1189
1186
mFullscreenHeight = dev_mode.dmPelsHeight ;
1190
- mFullscreenBits = dev_mode.dmBitsPerPel ;
1191
1187
mFullscreenRefresh = dev_mode.dmDisplayFrequency ;
1192
1188
1193
1189
LL_INFOS (" Window" ) << " Running at " << dev_mode.dmPelsWidth
@@ -1213,7 +1209,6 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo
1213
1209
mFullscreen = false ;
1214
1210
mFullscreenWidth = -1 ;
1215
1211
mFullscreenHeight = -1 ;
1216
- mFullscreenBits = -1 ;
1217
1212
mFullscreenRefresh = -1 ;
1218
1213
1219
1214
LL_INFOS (" Window" ) << " Unable to run fullscreen at " << width << " x" << height << LL_ENDL;
@@ -3509,7 +3504,7 @@ F32 LLWindowWin32::getPixelAspectRatio()
3509
3504
3510
3505
// Change display resolution. Returns true if successful.
3511
3506
// protected
3512
- bool LLWindowWin32::setDisplayResolution (S32 width, S32 height, S32 bits, S32 refresh)
3507
+ bool LLWindowWin32::setDisplayResolution (S32 width, S32 height, S32 refresh)
3513
3508
{
3514
3509
DEVMODE dev_mode;
3515
3510
::ZeroMemory (&dev_mode, sizeof (DEVMODE));
@@ -3521,7 +3516,6 @@ bool LLWindowWin32::setDisplayResolution(S32 width, S32 height, S32 bits, S32 re
3521
3516
{
3522
3517
if (dev_mode.dmPelsWidth == width &&
3523
3518
dev_mode.dmPelsHeight == height &&
3524
- dev_mode.dmBitsPerPel == bits &&
3525
3519
dev_mode.dmDisplayFrequency == refresh )
3526
3520
{
3527
3521
// ...display mode identical, do nothing
@@ -3533,9 +3527,8 @@ bool LLWindowWin32::setDisplayResolution(S32 width, S32 height, S32 bits, S32 re
3533
3527
dev_mode.dmSize = sizeof (dev_mode);
3534
3528
dev_mode.dmPelsWidth = width;
3535
3529
dev_mode.dmPelsHeight = height;
3536
- dev_mode.dmBitsPerPel = bits;
3537
3530
dev_mode.dmDisplayFrequency = refresh;
3538
- dev_mode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
3531
+ dev_mode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
3539
3532
3540
3533
// CDS_FULLSCREEN indicates that this is a temporary change to the device mode.
3541
3534
LONG cds_result = ChangeDisplaySettings (&dev_mode, CDS_FULLSCREEN);
@@ -3545,7 +3538,7 @@ bool LLWindowWin32::setDisplayResolution(S32 width, S32 height, S32 bits, S32 re
3545
3538
if (!success)
3546
3539
{
3547
3540
LL_WARNS (" Window" ) << " setDisplayResolution failed, "
3548
- << width << " x" << height << " x " << bits << " @ " << refresh << LL_ENDL;
3541
+ << width << " x" << height << " @ " << refresh << LL_ENDL;
3549
3542
}
3550
3543
3551
3544
return success;
@@ -3556,7 +3549,7 @@ bool LLWindowWin32::setFullscreenResolution()
3556
3549
{
3557
3550
if (mFullscreen )
3558
3551
{
3559
- return setDisplayResolution ( mFullscreenWidth , mFullscreenHeight , mFullscreenBits , mFullscreenRefresh );
3552
+ return setDisplayResolution ( mFullscreenWidth , mFullscreenHeight , mFullscreenRefresh );
3560
3553
}
3561
3554
else
3562
3555
{
0 commit comments