summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-01-07 10:39:05 -0500
committerOz Linden <oz@lindenlab.com>2011-01-07 10:39:05 -0500
commite1e38c4cee980f815091cd94c8a529ffe3e24918 (patch)
tree35b16f61bd120f83bb74a77d4417dce1108e0542 /indra/llwindow
parentc02d6a319f378d5dcc34c51b20f556f175d2a40a (diff)
parent09c01c4e925833873a83665fe0642637b65e547e (diff)
merge changes for storm-34
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/CMakeLists.txt5
-rw-r--r--indra/llwindow/llkeyboard.h2
-rw-r--r--indra/llwindow/llwindowwin32.cpp22
3 files changed, 25 insertions, 4 deletions
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index bf3233f386..4d2677fd91 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -59,12 +59,13 @@ set(viewer_HEADER_FILES
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
-if (NOT LINUX OR VIEWER)
+if (LINUX AND VIEWER)
set(llwindow_LINK_LIBRARIES
${UI_LIBRARIES} # for GTK
${SDL_LIBRARY}
+ fontconfig # For FCInit and other FC* functions.
)
-endif (NOT LINUX OR VIEWER)
+endif (LINUX AND VIEWER)
if (DARWIN)
list(APPEND llwindow_SOURCE_FILES
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h
index be16f31abc..ba472cfde5 100644
--- a/indra/llwindow/llkeyboard.h
+++ b/indra/llwindow/llkeyboard.h
@@ -40,7 +40,7 @@ enum EKeystate
KEYSTATE_UP
};
-typedef void (*LLKeyFunc)(EKeystate keystate);
+typedef boost::function<void(EKeystate keystate)> LLKeyFunc;
typedef std::string (LLKeyStringTranslatorFunc)(const char *label);
enum EKeyboardInsertMode
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.