From 1bf5d6c30cb91463e4effe7311d880b84b907d9e Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Tue, 15 Feb 2000 19:25:09 +0000 Subject: [PATCH] Makefile.in: Removed -lvga from in_x11.so build rest: misc. fixes --- common/Makefile.in | 2 +- common/gl_vidglx.c | 22 ++++++++-------------- common/in_x11.c | 2 +- common/vid_x11.c | 2 +- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/common/Makefile.in b/common/Makefile.in index 9a8e4f3..d0dc11c 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -190,7 +190,7 @@ IN_X11_OBJS = $(BUILD_DIR)/input_libs/in_x11.@OBJEXT@ $(IN_X11_LIB): in_input_DIR $(TARGET_DIR)/$(IN_X11_LIB) $(TARGET_DIR)/$(IN_X11_LIB): $(IN_X11_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -lvga -shared -rdynamic -o $@ $(IN_X11_OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ $(IN_X11_OBJS) endif diff --git a/common/gl_vidglx.c b/common/gl_vidglx.c index 4a3e254..eec2cc0 100644 --- a/common/gl_vidglx.c +++ b/common/gl_vidglx.c @@ -41,7 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #ifdef HAVE_DLFCN_H # include @@ -575,9 +574,6 @@ void VID_Init(unsigned char *palette) Window root; XVisualInfo *visinfo; - plugin_load("./in_x11.so"); - IN->Init(); - S_Init(); Cvar_RegisterVariable(&vid_mode); @@ -608,19 +604,17 @@ void VID_Init(unsigned char *palette) vid.conwidth = width; vid.conwidth &= 0xfff8; // make it a multiple of eight - - if (vid.conwidth < 320) - vid.conwidth = 320; + vid.conwidth = min(vid.conwidth, 320); // pick a conheight that matches with correct aspect - vid.conheight = vid.conwidth*3 / 4; + vid.conheight = vid.conwidth * 3 / 4; - if ((i = COM_CheckParm("-conheight")) != 0) - vid.conheight = Q_atoi(com_argv[i+1]); - if (vid.conheight < 200) - vid.conheight = 200; + i = COM_CheckParm ("-conheight"); + if ( i != 0 ) // Set console height, but no smaller than 200 px + vid.conheight = min(Q_atoi(com_argv[i+1]), 200); - if (!(dpy = XOpenDisplay(NULL))) { + dpy = XOpenDisplay(NULL); + if ( !dpy ) { fprintf(stderr, "Error couldn't open the X display\n"); exit(1); } @@ -719,7 +713,7 @@ void VID_Init(unsigned char *palette) GL_Init(); - snprintf(gldir, sizeof(gldir), "%s/OpenGL", com_gamedir); + snprintf(gldir, sizeof(gldir), "%s/glquake", com_gamedir); Sys_mkdir (gldir); VID_SetPalette(palette); diff --git a/common/in_x11.c b/common/in_x11.c index 4cd4ece..21ded30 100644 --- a/common/in_x11.c +++ b/common/in_x11.c @@ -143,7 +143,7 @@ static int X_IN_Init (unsigned char *palette) verbose=COM_CheckParm("-verbose"); // open the display - x_disp = XOpenDisplay(0); + x_disp = XOpenDisplay(NULL); if (!x_disp) { if (getenv("DISPLAY")) diff --git a/common/vid_x11.c b/common/vid_x11.c index 2a5e99a..0b05ec8 100644 --- a/common/vid_x11.c +++ b/common/vid_x11.c @@ -465,7 +465,7 @@ ResetSharedFrameBuffers(void) // the palette data will go away after the call, so it must be copied off if // the video driver will need it again -void VID_Init (unsigned char *palette) +void VID_Init (unsigned char *palette) { int pnum, i; XVisualInfo template;