From 7191e8b810bfd07eced4a07027bd0e35be2acde5 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 14 Mar 2001 23:38:34 +0000 Subject: [PATCH] Tweaks to PLIB version detection. --- src/Include/config.h.in | 2 +- src/Objects/obj.cxx | 9 ++++----- src/Sound/soundmgr.cxx | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Include/config.h.in b/src/Include/config.h.in index f291938dd..b1c6758c2 100644 --- a/src/Include/config.h.in +++ b/src/Include/config.h.in @@ -39,7 +39,7 @@ /* Define to enable plib joystick support (recommended) */ -#undef PLIB_AUDIO_IS_BROKEN +#undef PLIB_1_2_X /* Define to eliminate all trace of debugging messages such as for a diff --git a/src/Objects/obj.cxx b/src/Objects/obj.cxx index e18bfa9aa..71e03f281 100644 --- a/src/Objects/obj.cxx +++ b/src/Objects/obj.cxx @@ -32,11 +32,6 @@ #include #include -// #if defined ( __sun__ ) -// extern "C" void *memmove(void *, const void *, size_t); -// extern "C" void *memset(void *, int, size_t); -// #endif - #include #include @@ -247,6 +242,7 @@ ssgBranch *fgGenTile( const string& path, FGTileEntry *t) { } +#if defined ( PLIB_1_2_X ) static float fgTriArea( sgVec3 p0, sgVec3 p1, sgVec3 p2 ) { /* From comp.graph.algorithms FAQ @@ -272,6 +268,9 @@ static float fgTriArea( sgVec3 p0, sgVec3 p1, sgVec3 p2 ) { return( sgAbs(sgScalarProductVec3( norm, sum )) * SG_HALF ); } +#else +# define fgTriArea(p0,p1,p2) sgTriArea(p0,p1,p2) +#endif static void random_pt_inside_tri( float *res, diff --git a/src/Sound/soundmgr.cxx b/src/Sound/soundmgr.cxx index 24d3154b6..5a170e9a4 100644 --- a/src/Sound/soundmgr.cxx +++ b/src/Sound/soundmgr.cxx @@ -146,8 +146,8 @@ bool FGSoundMgr::remove( const string& refname ) { NULL, SL_VOLUME_ENVELOPE ); -#if defined ( PLIB_AUDIO_IS_BROKEN ) - // if PLIB_AUDIO_IS_BROKEN, we can't reliably remove sounds +#if defined ( PLIB_1_2_X ) + // if PLIB_1_2_X, we can't reliably remove sounds // that are currently being played. :-( So, let's just not // remove them and return false. The effects of this are that // the sound sample will continue to finish playing (or -- 2.39.5