mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 04:13:44 +02:00
Fixed checking the return values of SDL_AddBasicVideoDisplay() and SDL_AddVideoDisplay()
Also fixed Wayland and Windows usage of SDL_DelVideoDisplay() https://github.com/libsdl-org/SDL/issues/7192
This commit is contained in:
@@ -855,9 +855,10 @@ void WIN_RefreshDisplays(_THIS)
|
||||
// Delete any entries still marked as invalid, iterate
|
||||
// in reverse as each delete takes effect immediately
|
||||
for (i = _this->num_displays - 1; i >= 0; --i) {
|
||||
SDL_DisplayData *driverdata = _this->displays[i].driverdata;
|
||||
SDL_VideoDisplay *display = &_this->displays[i];
|
||||
SDL_DisplayData *driverdata = display->driverdata;
|
||||
if (driverdata->IsValid == SDL_FALSE) {
|
||||
SDL_DelVideoDisplay(i);
|
||||
SDL_DelVideoDisplay(display->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user