From: divverent Date: Fri, 1 Feb 2008 09:20:07 +0000 (+0000) Subject: fix broken table length, and yet another hardcoded index X-Git-Tag: xonotic-v0.1.0preview~2453 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc4a3ae632a8e4ac5303680d344dc63111ccb057;p=xonotic%2Fdarkplaces.git fix broken table length, and yet another hardcoded index git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8061 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/menu.c b/menu.c index 2cdae63c..7751e588 100644 --- a/menu.c +++ b/menu.c @@ -2793,9 +2793,9 @@ video_resolution_t video_resolutions[] = #define VID_DEFAULT 3 #define VID_RES_COUNT ((int)(sizeof(video_resolutions) / sizeof(video_resolutions[0])) - 1) -#define VIDEO_ITEMS 10 +#define VIDEO_ITEMS 11 static int video_cursor = 0; -static int video_cursor_table[] = {56, 68, 88, 100, 108, 116, 136, 166, 174, 182, 190}; +static int video_cursor_table[VIDEO_ITEMS] = {56, 68, 88, 100, 108, 116, 136, 166, 174, 182, 190}; static int video_resolution; void M_Menu_Video_f (void) @@ -2973,7 +2973,7 @@ static void M_Video_Key (int key, char ascii) m_entersound = true; switch (video_cursor) { - case 5: + case 6: Cvar_SetValueQuick (&vid_width, video_resolutions[video_resolution].width); Cvar_SetValueQuick (&vid_height, video_resolutions[video_resolution].height); Cvar_SetValueQuick (&vid_conwidth, video_resolutions[video_resolution].conwidth);