]> git.pld-linux.org Git - packages/doomlegacy.git/blame - doomlegacy-vidmodes.patch
- 1.42, works
[packages/doomlegacy.git] / doomlegacy-vidmodes.patch
CommitLineData
746b6f37 1--- doomlegacy-1.40/doomlegacy_142_src/linux_x/i_video_xshm.c~ Fri Mar 14 03:11:35 2003
2+++ doomlegacy-1.40/doomlegacy_142_src/linux_x/i_video_xshm.c Fri Mar 14 03:11:35 2003
df869ab0 3@@ -182,7 +182,9 @@
4 // resolution threshold for hires mode
5 #define HIRES_HORIZ (640)
6 #define HIRES_VERT (400)
7-
8+
9+#define MAX_NUM_VIDMODES (100)
10+
11 static boolean haveVoodoo = false;
12
13 extern consvar_t cv_fullscreen; // for fullscreen support under X and GLX
14@@ -197,8 +199,8 @@
15 static int lowest_vidmode;
16
17 static XF86VidModeModeInfo **vidmodes;
18-static char vidModeName[33][32]; // allow 33 different modes
19-static int vidmap[33];
20+static char vidModeName[MAX_NUM_VIDMODES][32]; // allow MAX_NUM_VIDMODES different modes
21+static int vidmap[MAX_NUM_VIDMODES];
22
23 // added for 1.27 19990220 by Kin
24 rendermode_t rendermode=render_soft;
25@@ -283,7 +285,8 @@
26 if(vidmode_ext) {
27 // get fullscreen modes
28 XF86VidModeGetAllModeLines(X_display, X_screen, &num_fullvidmodes, &vidmodes);
29- num_vidmodes = num_fullvidmodes;
30+ num_vidmodes = (num_fullvidmodes > MAX_NUM_VIDMODES)
31+ ? MAX_NUM_VIDMODES : num_fullvidmodes;
32
33 // initialize mapping
34 for(i=0; i<num_vidmodes; i++)
35@@ -1824,7 +1827,8 @@
36 if(haveVoodoo) // nothing to do
37 return;
38 if(vidmode_ext && cv_fullscreen.value) {
39- num_vidmodes = num_fullvidmodes;
40+ num_vidmodes = (num_fullvidmodes > MAX_NUM_VIDMODES)
41+ ? MAX_NUM_VIDMODES : num_fullvidmodes;
42
43 // initialize mapping
44 for(i=0; i<num_vidmodes; i++)
This page took 0.397215 seconds and 4 git commands to generate.