diff --git a/src/video/windows/SDL_windowsmodes.c b/src/video/windows/SDL_windowsmodes.c index 372571c53bc06..05df48ae4d130 100644 --- a/src/video/windows/SDL_windowsmodes.c +++ b/src/video/windows/SDL_windowsmodes.c @@ -355,11 +355,10 @@ static void WIN_AddDisplay(_THIS, HMONITOR hMonitor, const MONITORINFOEXW *info, display.driverdata = displaydata; WIN_GetDisplayBounds(_this, &display, &displaydata->bounds); index = SDL_AddVideoDisplay(&display, send_event); - SDL_assert(index == *display_index); SDL_free(display.name); done: - *display_index += 1; + *display_index = index + 1; } typedef struct _WIN_AddDisplaysData