XBIOS in interrupt not usable under MiNT
authorPatrice Mandin <patmandin@gmail.com>
Wed, 20 Jul 2005 17:39:10 +0000
changeset 1095f10892fa2e48
parent 1094 5012b97142ac
child 1096 37b766becf3b
XBIOS in interrupt not usable under MiNT
README.MiNT
src/audio/mint/SDL_mintaudio_mcsn.c
src/audio/mint/SDL_mintaudio_xbios.c
     1.1 --- a/README.MiNT	Mon Jul 18 13:42:57 2005 +0000
     1.2 +++ b/README.MiNT	Wed Jul 20 17:39:10 2005 +0000
     1.3 @@ -204,7 +204,7 @@
     1.4  
     1.5  Audio drivers:
     1.6  	Cookies _SND, MCSN, STFA and GSXB used to detect supported audio
     1.7 -	capabilities.
     1.8 +	capabilities. Note: XBIOS and MCSN drivers can not be used under MiNT.
     1.9  
    1.10  	STE, Mega STE, TT:
    1.11  		8 bits DMA (hardware access)
     2.1 --- a/src/audio/mint/SDL_mintaudio_mcsn.c	Mon Jul 18 13:42:57 2005 +0000
     2.2 +++ b/src/audio/mint/SDL_mintaudio_mcsn.c	Wed Jul 20 17:39:10 2005 +0000
     2.3 @@ -82,8 +82,14 @@
     2.4  
     2.5  static int Audio_Available(void)
     2.6  {
     2.7 +	unsigned long dummy;
     2.8  	const char *envr = getenv("SDL_AUDIODRIVER");
     2.9  
    2.10 +	/* We can't use XBIOS in interrupt under MiNT */
    2.11 +	if (Getcookie(C_MiNT, &dummy) == C_FOUND) {
    2.12 +		return(0);
    2.13 +	}
    2.14 +
    2.15  	/* Check if user asked a different audio driver */
    2.16  	if ((envr) && (strcmp(envr, MINT_AUDIO_DRIVER_NAME)!=0)) {
    2.17  		DEBUG_PRINT((DEBUG_NAME "user asked a different audio driver\n"));
     3.1 --- a/src/audio/mint/SDL_mintaudio_xbios.c	Mon Jul 18 13:42:57 2005 +0000
     3.2 +++ b/src/audio/mint/SDL_mintaudio_xbios.c	Wed Jul 20 17:39:10 2005 +0000
     3.3 @@ -82,8 +82,14 @@
     3.4  
     3.5  static int Audio_Available(void)
     3.6  {
     3.7 +	unsigned long dummy;
     3.8  	const char *envr = getenv("SDL_AUDIODRIVER");
     3.9  
    3.10 +	/* We can't use XBIOS in interrupt under MiNT */
    3.11 +	if (Getcookie(C_MiNT, &dummy) == C_FOUND) {
    3.12 +		return(0);
    3.13 +	}
    3.14 +
    3.15  	/* Check if user asked a different audio driver */
    3.16  	if ((envr) && (strcmp(envr, MINT_AUDIO_DRIVER_NAME)!=0)) {
    3.17  		DEBUG_PRINT((DEBUG_NAME "user asked a different audio driver\n"));