stuff I forgot to commit
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 3 Sep 2009 07:42:22 +0000 (07:42 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 3 Sep 2009 07:42:22 +0000 (07:42 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9159 d7cf8633-e32d-0410-b094-e92efae38249

menu.c
menu.h
mvm_cmds.c

diff --git a/menu.c b/menu.c
index 522b97b..97f3736 100644 (file)
--- 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 7ca77ef..5e8db63 100644 (file)
--- 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
 
index bb445a9..9b832d7 100644 (file)
@@ -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;
        }
 }