Skip to content
Snippets Groups Projects
Commit 88eca952 authored by Ptolemy's avatar Ptolemy
Browse files

SL-12971: Add logging of Display Devices -- useful on dual GPU machines

parent 1062efd0
No related branches found
No related tags found
No related merge requests found
...@@ -676,6 +676,37 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks, ...@@ -676,6 +676,37 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
// TrackMouseEvent( &track_mouse_event ); // 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 // Create GL drawing context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment