summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2010-12-13 12:34:39 -0800
committerDon Kjer <don@lindenlab.com>2010-12-13 12:34:39 -0800
commit9a322d1b7a6ee5380f8724b33a20c56c9583f093 (patch)
tree70ee8e942f30ac3ed2f371b60cfcba9adfd961c2 /indra/llwindow/llwindowwin32.cpp
parentf4884faf3a020a718c611f34aa534e80d8a8b666 (diff)
parente27bcbe0d20c87556b0bcb1e3feaaea6544d3e16 (diff)
Merge from viewer-development
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 87075c7318..ab089081e6 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -544,7 +544,27 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
if (closest_refresh == 0)
{
LL_WARNS("Window") << "Couldn't find display mode " << width << " by " << height << " at " << BITS_PER_PIXEL << " bits per pixel" << LL_ENDL;
- success = FALSE;
+ //success = FALSE;
+
+ if (!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode))
+ {
+ success = FALSE;
+ }
+ else
+ {
+ if (dev_mode.dmBitsPerPel == BITS_PER_PIXEL)
+ {
+ LL_WARNS("Window") << "Current BBP is OK falling back to that" << LL_ENDL;
+ window_rect.right=width=dev_mode.dmPelsWidth;
+ window_rect.bottom=height=dev_mode.dmPelsHeight;
+ success = TRUE;
+ }
+ else
+ {
+ LL_WARNS("Window") << "Current BBP is BAD" << LL_ENDL;
+ success = FALSE;
+ }
+ }
}
// If we found a good resolution, use it.