My tests show SDL2 seems not to support plugging in and out displays after init time. I am developing a VJ application that allows multiple screen/projector output and support for this would be very welcome. A hotplug event system would be handy, but just an update of the list of attached displays whenever SDL_GetNumVideoDisplays() is called would already be very handy.
You’ll want to watch for the event SDL_DISPLAYEVENT with the values:
typedef enum
{
SDL_DISPLAYEVENT_NONE, /**< Never used */
SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */
SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */
SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */
} SDL_DisplayEventID;