Implemented getting the display name on Windows
This commit is contained in:
parent
b1185a32e3
commit
0c7ab10e80
1 changed files with 6 additions and 0 deletions
|
@ -127,6 +127,7 @@ WIN_AddDisplay(LPTSTR DeviceName)
|
|||
SDL_VideoDisplay display;
|
||||
SDL_DisplayData *displaydata;
|
||||
SDL_DisplayMode mode;
|
||||
DISPLAY_DEVICE device;
|
||||
|
||||
#ifdef DEBUG_MODES
|
||||
printf("Display: %s\n", WIN_StringToUTF8(DeviceName));
|
||||
|
@ -143,10 +144,15 @@ WIN_AddDisplay(LPTSTR DeviceName)
|
|||
sizeof(displaydata->DeviceName));
|
||||
|
||||
SDL_zero(display);
|
||||
device.cb = sizeof(device);
|
||||
if (EnumDisplayDevices(DeviceName, 0, &device, 0)) {
|
||||
display.name = WIN_StringToUTF8(device.DeviceString);
|
||||
}
|
||||
display.desktop_mode = mode;
|
||||
display.current_mode = mode;
|
||||
display.driverdata = displaydata;
|
||||
SDL_AddVideoDisplay(&display);
|
||||
SDL_free(display.name);
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue