Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Removed duplicate state from arts driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 6, 2006
1 parent bdfcd39 commit 6a35761
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/audio/arts/SDL_artsaudio.c
Expand Up @@ -51,7 +51,6 @@ static void ARTS_WaitDone(_THIS);

static const char *arts_library = SDL_AUDIO_DRIVER_ARTS_DYNAMIC;
static void *arts_handle = NULL;
static int arts_loaded = 0;

/* !!! FIXME: I hate this SDL_NAME clutter...it makes everything so messy! */
static int (*SDL_NAME(arts_init)) (void);
Expand Down Expand Up @@ -89,10 +88,9 @@ static struct
static void
UnloadARTSLibrary()
{
if (arts_loaded) {
if (arts_handle != NULL) {
SDL_UnloadObject(arts_handle);
arts_handle = NULL;
arts_loaded = 0;
}
}

Expand All @@ -101,10 +99,9 @@ LoadARTSLibrary(void)
{
int i, retval = -1;

if (!arts_loaded) {
if (arts_handle == NULL) {
arts_handle = SDL_LoadObject(arts_library);
if (arts_handle) {
arts_loaded = 1;
if (arts_handle != NULL) {
retval = 0;
for (i = 0; i < SDL_arraysize(arts_functions); ++i) {
*arts_functions[i].func =
Expand Down

0 comments on commit 6a35761

Please sign in to comment.