Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Double driver registering fix by autopune (not tested by me!)

  • Loading branch information...
commit 977a50f77136cdb0b05bb0125691169c89c28173 1 parent f9ae1c2
denis111 authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 playercode/mdriver.c
View
10 playercode/mdriver.c
@@ -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.
@@ -203,7 +203,13 @@ void _mm_registerdriver(struct MDRIVER* drv)
/* don't register a MISSING() driver */
if ((drv->Name) && (drv->Version)) {
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;
} else
firstdriver = drv;
Please sign in to comment.
Something went wrong with that request. Please try again.