]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 522b97bb3abcae825a936e37a457cd5f4512e4b2..97f37360405b8f3a916b25ff4796f32202c6db05 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 7ca77ef35aa73c5ba4dfd458286ee34381da67aa..5e8db63a4c4ac0af767e5305fc4a710376116a30 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 bb445a997ac3de5c5a7f3791beba6c261fcc5774..9b832d7c91baf4afcfddd5de3373c174fc7705bd 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;
        }
 }