diff --git a/src/i_video.h b/src/i_video.h index f94a49d5c..e4b735058 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -140,6 +140,7 @@ void I_EndRead(void); UINT32 I_GetRefreshRate(void); +boolean I_CheckAboveDesktopRes(INT32 width, INT32 height); boolean I_CheckNativeRes(void); void I_SetBorderlessWindow(void); diff --git a/src/m_menu.c b/src/m_menu.c index 065f055cb..a483afa7f 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -9480,6 +9480,9 @@ void M_VideoModeMenu(INT32 choice) if (SCR_IsAspectCorrect(width, height)) modedescs[vidm_nummodes].goodratio = 1; + if (I_CheckAboveDesktopRes(width, height)) + modedescs[vidm_nummodes].goodratio = 2; + vidm_nummodes++; } } @@ -9671,7 +9674,11 @@ static void M_DrawVideoMode(void) V_DrawString(row, col, highlightflags|MENUCAPS, modedescs[i].desc); // Show multiples of 320x200 as green. else - V_DrawString(row, col, ((modedescs[i].goodratio) ? recommendedflags : 0)|MENUCAPS, modedescs[i].desc); + { + const UINT8 goodratio = modedescs[i].goodratio; + const INT32 goodflag = ((goodratio == 1) ? recommendedflags : (goodratio == 2) ? warningflags : 0); + V_DrawString(row, col, goodflag|MENUCAPS, modedescs[i].desc); + } col += 8; if ((i % vidm_column_size) == (vidm_column_size-1)) @@ -9711,9 +9718,26 @@ static void M_DrawVideoMode(void) V_DrawCenteredString(BASEVIDWIDTH/2, OP_VideoModeDef.y + 138, recommendedflags|MENUCAPS, "Marked modes are recommended."); V_DrawCenteredString(BASEVIDWIDTH/2, OP_VideoModeDef.y + 146, - highlightflags|MENUCAPS, "Other modes may have visual errors."); - V_DrawCenteredString(BASEVIDWIDTH/2, OP_VideoModeDef.y + 158, - highlightflags|MENUCAPS, "Larger modes may have performance issues."); + warningflags|MENUCAPS, "Marked modes are above Desktop resolution"); + + if (rendermode == render_opengl) + { +#ifdef USE_FBO_OGL + if (!cv_glframebuffer.value) +#endif + V_DrawCenteredString(BASEVIDWIDTH/2, OP_VideoModeDef.y + 154, + warningflags|MENUCAPS, "and will have visual errors in OpenGL mode."); + + V_DrawCenteredString(BASEVIDWIDTH/2, OP_VideoModeDef.y + 166, + highlightflags|MENUCAPS, "Other modes may have visual errors."); + } + else + { + V_DrawCenteredString(BASEVIDWIDTH/2, OP_VideoModeDef.y + 154, + highlightflags|MENUCAPS, "Other modes may have visual errors."); + V_DrawCenteredString(BASEVIDWIDTH/2, OP_VideoModeDef.y + 166, + highlightflags|MENUCAPS, "Larger modes may have performance issues."); + } } // Draw the cursor for the VidMode menu diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 243b40c28..5692319d5 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -493,18 +493,18 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt) if (windowmoved) { + I_CheckDesktopRes(); + // if we say moved our game window to a different screen // refetch our resolutions I_FillScreenResolutionsList(false); - #ifdef HWRENDER +#ifdef USE_FBO_OGL if (rendermode == render_opengl) { - I_CheckDesktopRes(); -#ifdef USE_FBO_OGL I_DownSample(); -#endif } +#endif #endif windowmoved = SDL_FALSE; } @@ -1260,6 +1260,11 @@ boolean I_CheckNativeRes(void) return (vid.width == desktopwidth && vid.height == desktopheight); } +boolean I_CheckAboveDesktopRes(INT32 width, INT32 height) +{ + return (width > desktopwidth || height > desktopheight); +} + #ifdef USE_FBO_OGL void RefreshOGLSDLSurface(void)