diskaudio: Use SDL_Log, not fprintf.

This commit is contained in:
Ryan C. Gordon 2017-01-05 19:30:45 -05:00
parent d024c724d1
commit 52130bde40
1 changed files with 6 additions and 6 deletions

View File

@ -33,6 +33,7 @@
#include "SDL_audio.h" #include "SDL_audio.h"
#include "../SDL_audio_c.h" #include "../SDL_audio_c.h"
#include "SDL_diskaudio.h" #include "SDL_diskaudio.h"
#include "SDL_log.h"
/* !!! FIXME: these should be SDL hints, not environment variables. */ /* !!! FIXME: these should be SDL hints, not environment variables. */
/* environment variables and defaults. */ /* environment variables and defaults. */
@ -160,12 +161,11 @@ DISKAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size); SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
} }
#if HAVE_STDIO_H SDL_LogCritical(SDL_LOG_CATEGORY_AUDIO,
fprintf(stderr, "You are using the SDL disk i/o audio driver!\n");
"WARNING: You are using the SDL disk i/o audio driver!\n" SDL_LogCritical(SDL_LOG_CATEGORY_AUDIO,
" %s file [%s].\n", iscapture ? "Reading from" : "Writing to", " %s file [%s].\n", iscapture ? "Reading from" : "Writing to",
fname); fname);
#endif
/* We're ready to rock and roll. :-) */ /* We're ready to rock and roll. :-) */
return 0; return 0;