SDL
SDL copied to clipboard
SDL2: Mac inaccurate display count after disconnection / laptop close
SDL2 version: 2.30.5 MacOS: Sonoma 14.6
How to reproduce
- Have a Mac laptop open with external display connected
- Run application
-
SDL_GetNumVideoDisplayswill report two displays - Close Mac laptop
-
SDL_GetNumVideoDisplayswill still report two displays - Calling
SDL_GetDisplayUsableBoundsfor display 0 will get the dimensions of the laptop but placement will still be on the monitor - Calling
SDL_GetDisplayUsableBoundsfor display 1 will get the dimensions of the monitor
What I expect
-
SDL_GetNumVideoDisplaysto report one display after I close my Mac laptop / "disconnect" that display -
SDL_GetDisplayUsableBoundsto return the actual monitors dimensions for monitor 0
Other notes
- If I restart the application after disconnecting the display (closing the laptop)
SDL_GetNumVideoDisplayswill report one display