

cleans up the suggested 3dfxgamma patch

diff -urN quake2~/Makefile quake2/Makefile
--- quake2~/Makefile	2005-12-13 08:27:15.000000000 +0200
+++ quake2/Makefile	2005-12-13 08:29:51.000000000 +0200
@@ -255,8 +255,6 @@
  TARGETS += $(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT)
 endif
 
-OBJ_3DFXGAMMA:=
-
 ifeq ($(ARCH),axp)
  ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
   $(warning Warning: SDLQuake2 not supported for $(ARCH))
@@ -375,6 +373,13 @@
  ifeq ($(strip $(BUILD_SDLGL)),YES)
   TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
  endif
+
+ ifeq ($(OSTYPE),Linux)
+ ifeq ($(strip $(USE_3DFXGAMMA)),YES)
+  GLXCFLAGS:=$(GLXCFLAGS) -DUSE_3DFXGAMMA
+ endif
+ endif
+
 endif # ARCH x86_64
 
 ifeq ($(ARCH),i386)
@@ -408,7 +413,6 @@
 
  ifeq ($(OSTYPE),Linux)
  ifeq ($(strip $(USE_3DFXGAMMA)),YES)
-  OBJ_3DFXGAMMA:=$(BUILDDIR)/ref_gl/fx_gamma.o 
   GLXCFLAGS:=$(GLXCFLAGS) -DUSE_3DFXGAMMA
  endif
  endif
@@ -1806,7 +1810,7 @@
 
 REF_GLX_OBJS = \
 	$(BUILDDIR)/ref_gl/gl_glx.o \
-	$(OBJ_3DFXGAMMA)\
+	$(BUILDDIR)/ref_gl/fx_gamma.o \
 	$(BUILDDIR)/ref_gl/rw_linux.o \
 	$(BUILDDIR)/ref_gl/joystick.o
 #	$(BUILDDIR)/ref_gl/rw_x11.o
diff -urN quake2~/src/linux/fx_gamma.c quake2/src/linux/fx_gamma.c
--- quake2~/src/linux/fx_gamma.c	2005-12-13 08:27:15.000000000 +0200
+++ quake2/src/linux/fx_gamma.c	2005-12-13 08:28:36.000000000 +0200
@@ -27,6 +27,8 @@
  * v0.0.3, 2005-12-05:	Updated documentation about the RTLD_GLOBAL flag.
  */
 
+#ifdef USE_3DFXGAMMA
+
 #include <stdlib.h>
 #include <string.h>
 #include <dlfcn.h>
@@ -73,10 +75,12 @@
 
 		dlclose(prjobj);
 	}
+/*
 	else
 	{	// shouldn't happen.
 		ret = -1;
 	}
+*/
 
 	return ret;
 }
@@ -191,3 +195,4 @@
 }
 #endif
 
+#endif	// USE_3DFXGAMMA
diff -urN quake2~/src/linux/gl_glx.c quake2/src/linux/gl_glx.c
--- quake2~/src/linux/gl_glx.c	2005-12-13 08:27:15.000000000 +0200
+++ quake2/src/linux/gl_glx.c	2005-12-13 08:31:33.000000000 +0200
@@ -875,9 +875,8 @@
 	{ // attempt to use glide symbols for gamma
 		gl_state.hwgamma = false;
 		gl_state.fxgamma = Init_3dfxGammaCtrl();
-		if (gl_state.fxgamma) {
+		if (gl_state.fxgamma)
 			ri.Con_Printf(PRINT_ALL, "Using 3dfx glide gamma controls\n");
-		}
 	}
 #endif
 	if (gl_state.hwgamma)
