From 59b6a5ccdb397cdd3a47c97d6cda5438a225a338 Mon Sep 17 00:00:00 2001 From: tma Date: Sat, 26 Nov 2005 15:01:28 +0000 Subject: * Disable ccache by default. If you want it, add USE_CCACHE=1 to Makefile.local * Remove -gfull from linux section in Makefile -- it's darwin only * Cast away some warnings that surfaced from using "new" AL headers * Various whitespace and consistency fixes git-svn-id: svn://svn.icculus.org/quake3/trunk@375 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/unix/unix_main.c | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'code/unix/unix_main.c') diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c index 82c9a42..58e1a08 100644 --- a/code/unix/unix_main.c +++ b/code/unix/unix_main.c @@ -364,24 +364,22 @@ void Sys_Quit (void) { static void Sys_DetectAltivec(void) { - extern cvar_t *com_altivec; - // Only detect if user hasn't forcibly disabled it. if (com_altivec->integer) { - #if idppc_altivec - #if MACOS_X - { - long feat = 0; - OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat); - if ((err==noErr) && ((1 << gestaltPowerPCHasVectorInstructions) & feat)) - com_altivec->integer = 1; - } - #else // !!! FIXME: PowerPC Linux, etc: how to detect? - com_altivec->integer = 1; - #endif - #else - com_altivec->integer = 0; // not an Altivec system, so never use it. - #endif +#if idppc_altivec +#ifdef MACOS_X + long feat = 0; + OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat); + if ((err==noErr) && ((1 << gestaltPowerPCHasVectorInstructions) & feat)) { + Cvar_Set( "com_altivec", "1" ); + } +#else // !!! FIXME: PowerPC Linux, etc: how to detect? + Cvar_Set( "com_altivec", "1" ); +#endif +#else + // not an Altivec system, so never use it. + Cvar_Set( "com_altivec", "0" ); +#endif } } @@ -705,9 +703,9 @@ void Sys_UnloadDll( void *dllHandle ) { return; } - #if USE_SDL_VIDEO +#if USE_SDL_VIDEO SDL_UnloadObject(dllHandle); - #else +#else dlclose( dllHandle ); { const char* err; // rb010123 - now const @@ -715,7 +713,7 @@ void Sys_UnloadDll( void *dllHandle ) { if ( err != NULL ) Com_Printf ( "Sys_UnloadGame failed on dlclose: \"%s\"!\n", err ); } - #endif +#endif } @@ -745,11 +743,11 @@ static void* try_dlopen(const char* base, const char* gamedir, const char* fname fn = FS_BuildOSPath( base, gamedir, fname ); Com_Printf( "Sys_LoadDll(%s)... \n", fn ); - #if USE_SDL_VIDEO +#if USE_SDL_VIDEO libHandle = SDL_LoadObject(fn); - #else +#else libHandle = dlopen( fn, Q_RTLD ); - #endif +#endif if(!libHandle) { Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, do_dlerror() ); @@ -827,14 +825,15 @@ void *Sys_LoadDll( const char *name, char *fqpath , #else Com_Printf ( "Sys_LoadDll(%s) failed dlsym(vmMain):\n\"%s\" !\n", name, err ); #endif - #if USE_SDL_VIDEO +#if USE_SDL_VIDEO SDL_UnloadObject(libHandle); - #else +#else dlclose( libHandle ); err = do_dlerror(); - if ( err != NULL ) + if ( err != NULL ) { Com_Printf ( "Sys_LoadDll(%s) failed dlcose:\n\"%s\"\n", name, err ); - #endif + } +#endif return NULL; } -- cgit v1.2.3