mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
Fixed setting SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER for the initial display
This commit is contained in:
parent
8fa93d64ab
commit
9896dc18e7
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue