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
|
#ifdef HAVE_DXGI1_6_H
|
||||||
WIN_GetHDRProperties(_this, hMonitor, &display.HDR);
|
WIN_GetHDRProperties(_this, hMonitor, &display.HDR);
|
||||||
#endif
|
#endif
|
||||||
if (SDL_AddVideoDisplay(&display, false)) {
|
SDL_DisplayID displayID = SDL_AddVideoDisplay(&display, false);
|
||||||
|
if (displayID) {
|
||||||
// The mode is owned by the video subsystem
|
// The mode is owned by the video subsystem
|
||||||
mode.internal = NULL;
|
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);
|
SDL_SetPointerProperty(props, SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER, hMonitor);
|
||||||
} else {
|
} else {
|
||||||
SDL_free(displaydata);
|
SDL_free(displaydata);
|
||||||
|
|||||||
Reference in New Issue
Block a user