diff --git a/src/video/windows/SDL_windowsmodes.c b/src/video/windows/SDL_windowsmodes.c index 1687e277a..f64a5788b 100644 --- a/src/video/windows/SDL_windowsmodes.c +++ b/src/video/windows/SDL_windowsmodes.c @@ -274,9 +274,11 @@ WIN_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata; LONG status; - status = - ChangeDisplaySettingsEx(displaydata->DeviceName, &data->DeviceMode, - NULL, CDS_FULLSCREEN, NULL); + if (mode->driverdata == display->desktop_mode.driverdata) { + status = ChangeDisplaySettingsEx(displaydata->DeviceName, NULL, NULL, 0, NULL); + } else { + status = ChangeDisplaySettingsEx(displaydata->DeviceName, &data->DeviceMode, NULL, CDS_FULLSCREEN, NULL); + } if (status != DISP_CHANGE_SUCCESSFUL) { const char *reason = "Unknown reason"; switch (status) {