summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 0b3936f8a5..de83efb8a3 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -676,6 +676,37 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
// TrackMouseEvent( &track_mouse_event );
// }
+ // SL-12971 dual GPU display
+ DISPLAY_DEVICEA display_device;
+ int display_index = -1;
+ DWORD display_flags = 0; // EDD_GET_DEVICE_INTERFACE_NAME ?
+ const size_t display_bytes = sizeof(display_device);
+
+ do
+ {
+ if (display_index >= 0)
+ {
+ // CHAR DeviceName [ 32] Adapter name
+ // CHAR DeviceString[128]
+ CHAR text[256];
+
+ size_t name_len = strlen(display_device.DeviceName );
+ size_t desc_len = strlen(display_device.DeviceString);
+
+ CHAR *name = name_len ? display_device.DeviceName : "???";
+ CHAR *desc = desc_len ? display_device.DeviceString : "???";
+
+ sprintf(text, "Display Device %d: %s, %s", display_index, name, desc);
+ LL_INFOS("Window") << text << LL_ENDL;
+ }
+
+ ::ZeroMemory(&display_device,display_bytes);
+ display_device.cb = display_bytes;
+
+ display_index++;
+ } while( EnumDisplayDevicesA(NULL, display_index, &display_device, display_flags ));
+
+ LL_INFOS("Window") << "Total Display Devices: " << display_index << LL_ENDL;
//-----------------------------------------------------------------------
// Create GL drawing context