Mercurial > sdl-ios-xcode
changeset 3635:5ea5e4e6103f
Call SDL_Init() before SDL_GetNumAudioDrivers().
Not sure why that was reversed.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 10 Jan 2010 19:09:57 +0000 |
parents | 1e31a24c41a6 |
children | e474a820daeb |
files | test/testaudioinfo.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/test/testaudioinfo.c Sun Jan 10 18:25:04 2010 +0000 +++ b/test/testaudioinfo.c Sun Jan 10 19:09:57 2010 +0000 @@ -25,6 +25,12 @@ int main(int argc, char **argv) { + /* Load the SDL library */ + if (SDL_Init(SDL_INIT_AUDIO) < 0) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + /* Print available audio drivers */ int n = SDL_GetNumAudioDrivers(); if (n == 0) { @@ -38,12 +44,6 @@ printf("\n"); } - /* Load the SDL library */ - if (SDL_Init(SDL_INIT_AUDIO) < 0) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); - return (1); - } - printf("Using audio driver: %s\n\n", SDL_GetCurrentAudioDriver()); print_devices(0);