@@ -695,8 +695,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
695
695
}
696
696
697
697
if (dev_mode.dmPelsWidth == width &&
698
- dev_mode.dmPelsHeight == height &&
699
- dev_mode.dmBitsPerPel == BITS_PER_PIXEL)
698
+ dev_mode.dmPelsHeight == height)
700
699
{
701
700
success = true ;
702
701
if ((dev_mode.dmDisplayFrequency - current_refresh)
@@ -736,7 +735,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
736
735
// If we found a good resolution, use it.
737
736
if (success)
738
737
{
739
- success = setDisplayResolution (width, height, BITS_PER_PIXEL, closest_refresh);
738
+ success = setDisplayResolution (width, height, closest_refresh);
740
739
}
741
740
742
741
// Keep a copy of the actual current device mode in case we minimize
@@ -749,7 +748,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
749
748
mFullscreen = true ;
750
749
mFullscreenWidth = dev_mode.dmPelsWidth ;
751
750
mFullscreenHeight = dev_mode.dmPelsHeight ;
752
- mFullscreenBits = dev_mode.dmBitsPerPel ;
753
751
mFullscreenRefresh = dev_mode.dmDisplayFrequency ;
754
752
755
753
LL_INFOS (" Window" ) << " Running at " << dev_mode.dmPelsWidth
@@ -763,7 +761,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
763
761
mFullscreen = false ;
764
762
mFullscreenWidth = -1 ;
765
763
mFullscreenHeight = -1 ;
766
- mFullscreenBits = -1 ;
767
764
mFullscreenRefresh = -1 ;
768
765
769
766
std::map<std::string,std::string> args;
@@ -1185,7 +1182,7 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo
1185
1182
// If we found a good resolution, use it.
1186
1183
if (success)
1187
1184
{
1188
- success = setDisplayResolution (width, height, BITS_PER_PIXEL, closest_refresh);
1185
+ success = setDisplayResolution (width, height, closest_refresh);
1189
1186
}
1190
1187
1191
1188
// Keep a copy of the actual current device mode in case we minimize
@@ -1197,7 +1194,6 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo
1197
1194
mFullscreen = true ;
1198
1195
mFullscreenWidth = dev_mode.dmPelsWidth ;
1199
1196
mFullscreenHeight = dev_mode.dmPelsHeight ;
1200
- mFullscreenBits = dev_mode.dmBitsPerPel ;
1201
1197
mFullscreenRefresh = dev_mode.dmDisplayFrequency ;
1202
1198
1203
1199
LL_INFOS (" Window" ) << " Running at " << dev_mode.dmPelsWidth
@@ -1223,7 +1219,6 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo
1223
1219
mFullscreen = false ;
1224
1220
mFullscreenWidth = -1 ;
1225
1221
mFullscreenHeight = -1 ;
1226
- mFullscreenBits = -1 ;
1227
1222
mFullscreenRefresh = -1 ;
1228
1223
1229
1224
LL_INFOS (" Window" ) << " Unable to run fullscreen at " << width << " x" << height << LL_ENDL;
@@ -3517,7 +3512,7 @@ F32 LLWindowWin32::getPixelAspectRatio()
3517
3512
3518
3513
// Change display resolution. Returns true if successful.
3519
3514
// protected
3520
- bool LLWindowWin32::setDisplayResolution (S32 width, S32 height, S32 bits, S32 refresh)
3515
+ bool LLWindowWin32::setDisplayResolution (S32 width, S32 height, S32 refresh)
3521
3516
{
3522
3517
DEVMODE dev_mode;
3523
3518
::ZeroMemory (&dev_mode, sizeof (DEVMODE));
@@ -3529,7 +3524,6 @@ bool LLWindowWin32::setDisplayResolution(S32 width, S32 height, S32 bits, S32 re
3529
3524
{
3530
3525
if (dev_mode.dmPelsWidth == width &&
3531
3526
dev_mode.dmPelsHeight == height &&
3532
- dev_mode.dmBitsPerPel == bits &&
3533
3527
dev_mode.dmDisplayFrequency == refresh )
3534
3528
{
3535
3529
// ...display mode identical, do nothing
@@ -3541,9 +3535,8 @@ bool LLWindowWin32::setDisplayResolution(S32 width, S32 height, S32 bits, S32 re
3541
3535
dev_mode.dmSize = sizeof (dev_mode);
3542
3536
dev_mode.dmPelsWidth = width;
3543
3537
dev_mode.dmPelsHeight = height;
3544
- dev_mode.dmBitsPerPel = bits;
3545
3538
dev_mode.dmDisplayFrequency = refresh;
3546
- dev_mode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
3539
+ dev_mode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
3547
3540
3548
3541
// CDS_FULLSCREEN indicates that this is a temporary change to the device mode.
3549
3542
LONG cds_result = ChangeDisplaySettings (&dev_mode, CDS_FULLSCREEN);
@@ -3553,7 +3546,7 @@ bool LLWindowWin32::setDisplayResolution(S32 width, S32 height, S32 bits, S32 re
3553
3546
if (!success)
3554
3547
{
3555
3548
LL_WARNS (" Window" ) << " setDisplayResolution failed, "
3556
- << width << " x" << height << " x " << bits << " @ " << refresh << LL_ENDL;
3549
+ << width << " x" << height << " @ " << refresh << LL_ENDL;
3557
3550
}
3558
3551
3559
3552
return success;
@@ -3564,7 +3557,7 @@ bool LLWindowWin32::setFullscreenResolution()
3564
3557
{
3565
3558
if (mFullscreen )
3566
3559
{
3567
- return setDisplayResolution ( mFullscreenWidth , mFullscreenHeight , mFullscreenBits , mFullscreenRefresh );
3560
+ return setDisplayResolution ( mFullscreenWidth , mFullscreenHeight , mFullscreenRefresh );
3568
3561
}
3569
3562
else
3570
3563
{
0 commit comments