From 734e4b83218340b0fecbde230c7faa22f597ac84 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 21 Apr 2008 11:46:49 +0000 Subject: [PATCH] this should fix some Solaris/NetBSD/OpenBSD compile problems, model_t still remaining git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8259 d7cf8633-e32d-0410-b094-e92efae38249 --- snd_bsd.c | 9 ++++++--- vid_glx.c | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/snd_bsd.c b/snd_bsd.c index 4237b6ab..e32766f1 100644 --- a/snd_bsd.c +++ b/snd_bsd.c @@ -91,8 +91,11 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) # endif #endif - if (ioctl (audio_fd, AUDIO_SETINFO, &info) == 0) - break; + if (ioctl (audio_fd, AUDIO_SETINFO, &info) != 0) + { + Con_Printf("Can't set up the sound device (%s)\n", snddev); + return false; + } // TODO: check the parameters with AUDIO_GETINFO // TODO: check AUDIO_ENCODINGFLAG_EMULATED with AUDIO_GETENC @@ -194,7 +197,7 @@ unsigned int SndSys_GetSoundTime (void) if (ioctl (audio_fd, AUDIO_GETINFO, &info) < 0) { Con_Print("Error: can't get audio info\n"); - SNDDMA_Shutdown (); + SndSys_Shutdown (); return 0; } diff --git a/vid_glx.c b/vid_glx.c index fb011d13..e10cccfe 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -89,7 +89,6 @@ Atom wm_delete_window_atom; static qboolean mouse_avail = true; static qboolean vid_usingmouse = false; -static qboolean vid_usingdgamouse = false; static qboolean vid_usingvsync = false; static qboolean vid_usevsync = false; static qboolean vid_x11_hardwaregammasupported = false; @@ -100,6 +99,7 @@ static int p_mouse_x, p_mouse_y; #if !defined(__APPLE__) && !defined(SUNOS) cvar_t vid_dgamouse = {CVAR_SAVE, "vid_dgamouse", "1", "make use of DGA mouse input"}; +static qboolean vid_usingdgamouse = false; #endif qboolean vidmode_ext = false; @@ -289,7 +289,9 @@ static void IN_Activate (qboolean grab) mouse_x = mouse_y = 0; cl_ignoremousemoves = 2; vid_usingmouse = true; +#if !defined(__APPLE__) && !defined(SUNOS) vid_usingdgamouse = !!vid_dgamouse.integer; +#endif } } else -- 2.39.2