Skip to content

Commit

Permalink
Double driver registering fix by autopune (not tested by me!)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis111 committed Dec 3, 2007
1 parent f9ae1c2 commit 977a50f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions playercode/mdriver.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


/*============================================================================== /*==============================================================================
$Id: mdriver.c,v 1.3 2006/08/08 00:06:31 realtech Exp $ $Id: mdriver.c,v 1.4 2007/12/03 20:59:05 denis111 Exp $
These routines are used to access the available soundcard drivers. These routines are used to access the available soundcard drivers.
Expand Down Expand Up @@ -203,7 +203,13 @@ void _mm_registerdriver(struct MDRIVER* drv)
/* don't register a MISSING() driver */ /* don't register a MISSING() driver */
if ((drv->Name) && (drv->Version)) { if ((drv->Name) && (drv->Version)) {
if (cruise) { if (cruise) {
while (cruise->next) cruise = cruise->next; if ( cruise == drv )
return;
while(cruise->next) {
cruise = cruise->next;
if ( cruise == drv )
return;
}
cruise->next = drv; cruise->next = drv;
} else } else
firstdriver = drv; firstdriver = drv;
Expand Down

0 comments on commit 977a50f

Please sign in to comment.