From 0a7c6f77deaaf930e9e16370266d3628ef645943 Mon Sep 17 00:00:00 2001 From: Sander van Dijk Date: Sun, 17 Feb 2013 17:58:05 +0000 Subject: [PATCH] gl_vidsdl.c: get rid of "modenum" git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@807 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/gl_vidsdl.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Quake/gl_vidsdl.c b/Quake/gl_vidsdl.c index 45977580..e37af9c8 100644 --- a/Quake/gl_vidsdl.c +++ b/Quake/gl_vidsdl.c @@ -67,7 +67,6 @@ static SDL_Surface *draw_context; static qboolean vid_locked = false; //johnfitz static qboolean vid_changed = false; -static int vid_modenum = MS_UNINIT; static int vid_default = MS_WINDOWED; static qboolean fullsbardraw = false; @@ -267,8 +266,6 @@ static int VID_SetMode (int modenum) BGM_Resume (); scr_disabled_for_loading = temp; - vid_modenum = modenum; - // fix the leftover Alt from any Alt-Tab or the like that switched us away ClearAllStates (); @@ -795,14 +792,12 @@ VID_DescribeCurrentMode_f */ static void VID_DescribeCurrentMode_f (void) { - if (vid_modenum >= 0 && vid_modenum < nummodes) - { + if (draw_context) Con_Printf("%dx%dx%d %s\n", - modelist[vid_modenum].width, - modelist[vid_modenum].height, - modelist[vid_modenum].bpp, - (modelist[vid_modenum].type == MS_FULLSCREEN) ? "fullscreen" : "windowed"); - } + draw_context->w, + draw_context->h, + draw_context->format->BitsPerPixel, + draw_context->flags & SDL_FULLSCREEN ? "fullscreen" : "windowed"); } /*