From ad7963df934abe79c4c9a7a0a184f3fe637109d5 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 3 Sep 2009 07:42:22 +0000 Subject: [PATCH] stuff I forgot to commit git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9159 d7cf8633-e32d-0410-b094-e92efae38249 --- menu.c | 6 +++--- menu.h | 2 ++ mvm_cmds.c | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/menu.c b/menu.c index 522b97bb..97f37360 100644 --- a/menu.c +++ b/menu.c @@ -2800,9 +2800,9 @@ static int menu_video_resolution; video_resolution_t *video_resolutions; int video_resolutions_count; -video_resolution_t *menu_video_resolutions; -int menu_video_resolutions_count; -qboolean menu_video_resolutions_forfullscreen; +static video_resolution_t *menu_video_resolutions; +static int menu_video_resolutions_count; +static qboolean menu_video_resolutions_forfullscreen; static void M_Menu_Video_FindResolution(int w, int h, float a) { diff --git a/menu.h b/menu.h index 7ca77ef3..5e8db63a 100644 --- a/menu.h +++ b/menu.h @@ -95,5 +95,7 @@ typedef struct video_resolution_s video_resolution_t; extern video_resolution_t *video_resolutions; extern int video_resolutions_count; +extern video_resolution_t video_resolutions_hardcoded[]; +extern int video_resolutions_hardcoded_count; #endif diff --git a/mvm_cmds.c b/mvm_cmds.c index bb445a99..9b832d7c 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -229,9 +229,9 @@ void VM_M_getresolution(void) nr = (int)PRVM_G_FLOAT(OFS_PARM0); - l = ((prog->argc <= 1) || ((int)PRVM_G_FLOAT(OFS_PARM1))); + fs = ((prog->argc <= 1) || ((int)PRVM_G_FLOAT(OFS_PARM1))); - if(nr < 0 || nr >= (l ? video_resolutions_count : video_resolutions_hardcoded_count)) + if(nr < 0 || nr >= (fs ? video_resolutions_count : video_resolutions_hardcoded_count)) { PRVM_G_VECTOR(OFS_RETURN)[0] = 0; PRVM_G_VECTOR(OFS_RETURN)[1] = 0; @@ -239,8 +239,8 @@ void VM_M_getresolution(void) } else { - PRVM_G_VECTOR(OFS_RETURN)[0] = (l ? video_resolutions : video_resolutions_hardcoded)[nr].width; - PRVM_G_VECTOR(OFS_RETURN)[1] = (l ? video_resolutions : video_resolutions_hardcoded)[nr].height; + PRVM_G_VECTOR(OFS_RETURN)[0] = (fs ? video_resolutions : video_resolutions_hardcoded)[nr].width; + PRVM_G_VECTOR(OFS_RETURN)[1] = (fs ? video_resolutions : video_resolutions_hardcoded)[nr].height; PRVM_G_VECTOR(OFS_RETURN)[2] = 0; } } -- 2.39.2