SDL icon indicating copy to clipboard operation
SDL copied to clipboard

SDL2: Mac inaccurate display count after disconnection / laptop close

Open silbinarywolf opened this issue 1 year ago • 0 comments

SDL2 version: 2.30.5 MacOS: Sonoma 14.6

How to reproduce

  • Have a Mac laptop open with external display connected
  • Run application
  • SDL_GetNumVideoDisplays will report two displays
  • Close Mac laptop
  • SDL_GetNumVideoDisplays will still report two displays
  • Calling SDL_GetDisplayUsableBounds for display 0 will get the dimensions of the laptop but placement will still be on the monitor
  • Calling SDL_GetDisplayUsableBounds for display 1 will get the dimensions of the monitor

What I expect

  • SDL_GetNumVideoDisplays to report one display after I close my Mac laptop / "disconnect" that display
  • SDL_GetDisplayUsableBounds to return the actual monitors dimensions for monitor 0

Other notes

  • If I restart the application after disconnecting the display (closing the laptop) SDL_GetNumVideoDisplays will report one display

silbinarywolf avatar Aug 28 '24 02:08 silbinarywolf