mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-24 04:35:03 +00:00
Make sure the display list is up to date for window placement
This commit is contained in:
parent
264da8c127
commit
ab479b4961
|
@ -187,6 +187,11 @@ struct SDL_VideoDevice
|
||||||
* Display functions
|
* Display functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Refresh the display list
|
||||||
|
*/
|
||||||
|
void (*RefreshDisplays)(_THIS);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the bounds of a display
|
* Get the bounds of a display
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1584,6 +1584,11 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure the display list is up to date for window placement */
|
||||||
|
if (_this->RefreshDisplays) {
|
||||||
|
_this->RefreshDisplays(_this);
|
||||||
|
}
|
||||||
|
|
||||||
/* ensure no more than one of these flags is set */
|
/* ensure no more than one of these flags is set */
|
||||||
type_flags = flags & (SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU);
|
type_flags = flags & (SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU);
|
||||||
if ((type_flags & (type_flags - 1)) != 0) {
|
if ((type_flags & (type_flags - 1)) != 0) {
|
||||||
|
|
|
@ -159,6 +159,7 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
|
||||||
device->VideoInit = WIN_VideoInit;
|
device->VideoInit = WIN_VideoInit;
|
||||||
device->VideoQuit = WIN_VideoQuit;
|
device->VideoQuit = WIN_VideoQuit;
|
||||||
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
||||||
|
device->RefreshDisplays = WIN_RefreshDisplays;
|
||||||
device->GetDisplayBounds = WIN_GetDisplayBounds;
|
device->GetDisplayBounds = WIN_GetDisplayBounds;
|
||||||
device->GetDisplayUsableBounds = WIN_GetDisplayUsableBounds;
|
device->GetDisplayUsableBounds = WIN_GetDisplayUsableBounds;
|
||||||
device->GetDisplayDPI = WIN_GetDisplayDPI;
|
device->GetDisplayDPI = WIN_GetDisplayDPI;
|
||||||
|
|
Loading…
Reference in a new issue