Mercurial > sdl-ios-xcode
diff src/audio/mint/SDL_mintaudio.c @ 2027:d48ead2d2ba5
Save/restore FPU registers in interrupt
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Sat, 16 Sep 2006 16:59:46 +0000 |
parents | c121d94672cb |
children | adf732f1f016 |
line wrap: on
line diff
--- a/src/audio/mint/SDL_mintaudio.c Wed Sep 13 04:47:46 2006 +0000 +++ b/src/audio/mint/SDL_mintaudio.c Sat Sep 16 16:59:46 2006 +0000 @@ -145,6 +145,26 @@ return MINTAUDIO_freqcount - 1; } +/* Check if FPU is present */ +void SDL_MintAudio_CheckFpu(void) +{ + unsigned long cookie_fpu; + + SDL_MintAudio_hasfpu = 0; + if (Getcookie(C__FPU, &cookie_fpu) != C_FOUND) { + return; + } + switch ((cookie_fpu>>16)&0xfffe) { + case 2: + case 4: + case 6: + case 8: + case 16: + SDL_MintAudio_hasfpu = 1; + break; + } +} + /* The thread function, used under MiNT with xbios */ int SDL_MintAudio_Thread(long param)