aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix/unix_main.c
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-12-04 21:40:25 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-12-04 21:40:25 +0000
commit11273ed8d96a39f140f0bd82009e31fe435cc3d7 (patch)
tree1c234b00dc1a224a71054a119186bcfc1bdb1cfd /code/unix/unix_main.c
parent743a8fd50fc698f7a45cf54c89943231cd11b5f3 (diff)
downloadioquake3-aero-11273ed8d96a39f140f0bd82009e31fe435cc3d7.tar.gz
ioquake3-aero-11273ed8d96a39f140f0bd82009e31fe435cc3d7.zip
Better altivec cvar handling. Should fix crashes at startup, or curious
people that toggle it on at runtime on a G3. git-svn-id: svn://svn.icculus.org/quake3/trunk@410 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix/unix_main.c')
-rw-r--r--code/unix/unix_main.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c
index f347027..87ee005 100644
--- a/code/unix/unix_main.c
+++ b/code/unix/unix_main.c
@@ -377,12 +377,11 @@ static void illegal_instruction(int sig)
}
#endif
-static void Sys_DetectAltivec(void)
+qboolean Sys_DetectAltivec( void )
{
- // Only detect if user hasn't forcibly disabled it.
- if (com_altivec->integer) {
-#if idppc_altivec
qboolean altivec = qfalse;
+
+#if idppc_altivec
#ifdef MACOS_X
long feat = 0;
OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat);
@@ -401,12 +400,9 @@ static void Sys_DetectAltivec(void)
}
signal(SIGILL, handler);
#endif
-
- if (!altivec) {
- Cvar_Set( "com_altivec", "0" ); // we don't have it! Disable support!
- }
#endif
- }
+
+ return altivec;
}
void Sys_Init(void)