Solaris compile fixes
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 10 Sep 2008 09:57:24 +0000 (09:57 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 10 Sep 2008 09:57:24 +0000 (09:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8497 d7cf8633-e32d-0410-b094-e92efae38249

makefile.inc
vid_glx.c

index 0d5d790..38a1625 100644 (file)
@@ -37,8 +37,8 @@ STRIP?=strip
 OBJ_SND_COMMON=snd_main.o snd_mem.o snd_mix.o snd_ogg.o snd_wav.o snd_modplug.o
 
 # Additional stuff for libmodplug
-LIB_SND_MODPLUG=`if [ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ]; then echo " $(DP_MODPLUG_STATIC_LIBDIR)/libmodplug.a -lstdc++"; fi`
-CFLAGS_SND_MODPLUG=`if [ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ]; then echo " -I$(DP_MODPLUG_STATIC_LIBDIR)/../include -DSND_MODPLUG_STATIC"; fi`
+LIB_SND_MODPLUG=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ $(DP_MODPLUG_STATIC_LIBDIR)/libmodplug.a\ -lstdc++`
+CFLAGS_SND_MODPLUG=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ -I$(DP_MODPLUG_STATIC_LIBDIR)/../include\ -DSND_MODPLUG_STATIC`
 
 # No sound
 OBJ_SND_NULL=snd_null.o
index 4050a1c..40cebe1 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -252,7 +252,9 @@ static Cursor CreateNullCursor(Display *display, Window root)
 
 void VID_SetMouse(qboolean fullscreengrab, qboolean relative, qboolean hidecursor)
 {
+#if !defined(__APPLE__) && !defined(SUNOS)
        qboolean usedgamouse;
+#endif
 
        if (!vidx11_display || !win)
                return;
@@ -263,8 +265,8 @@ void VID_SetMouse(qboolean fullscreengrab, qboolean relative, qboolean hidecurso
        if (!mouse_avail)
                fullscreengrab = relative = hidecursor = false;
 
-       usedgamouse = relative && vid_dgamouse.integer;
 #if !defined(__APPLE__) && !defined(SUNOS)
+       usedgamouse = relative && vid_dgamouse.integer;
        if (!vid_x11_dgasupported)
                usedgamouse = false;
        if (fullscreengrab && vid_usingmouse && (vid_usingdgamouse != usedgamouse))