mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-25 15:48:58 +00:00
Fixed setting SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER for the initial display
This commit is contained in:
@@ -665,11 +665,12 @@ static void WIN_AddDisplay(SDL_VideoDevice *_this, HMONITOR hMonitor, const MONI
|
||||
#ifdef HAVE_DXGI1_6_H
|
||||
WIN_GetHDRProperties(_this, hMonitor, &display.HDR);
|
||||
#endif
|
||||
if (SDL_AddVideoDisplay(&display, false)) {
|
||||
SDL_DisplayID displayID = SDL_AddVideoDisplay(&display, false);
|
||||
if (displayID) {
|
||||
// The mode is owned by the video subsystem
|
||||
mode.internal = NULL;
|
||||
|
||||
SDL_PropertiesID props = SDL_GetDisplayProperties(display.id);
|
||||
SDL_PropertiesID props = SDL_GetDisplayProperties(displayID);
|
||||
SDL_SetPointerProperty(props, SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER, hMonitor);
|
||||
} else {
|
||||
SDL_free(displaydata);
|
||||
|
||||
Reference in New Issue
Block a user