Skip to contentSkip to conversation

Fix warnings : hw/fmopl.[ch] (BUILD_Y8950 is not defined)

PATCH In review Sylvain Petreolle 2 participants 2 messages Nov 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix warnings : hw/fmopl.[ch] (BUILD_Y8950 is not defined)

Signed-off by: Sylvain Petreolle<[email protected]>

fmopl.c (copie de travail) renamed from fmopl.c (révision 5668) +6 -6
Index: hw/fmopl.c
===================================================================
@@ -813,7 +813,7 @@
                 }
             }
             return;
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
         case 0x06:        /* Key Board OUT */
             if(OPL->type&OPL_TYPE_KEYBOARD)
             {
@@ -1098,7 +1098,7 @@
 }
 #endif /* (BUILD_YM3812 || BUILD_YM3526) */
 
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
 
 void Y8950UpdateOne(FM_OPL *OPL, INT16 *buffer, int length)
 {
@@ -1190,7 +1190,7 @@
             CH->SLOT[s].evs = 0;
         }
     }
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
     if(OPL->type&OPL_TYPE_ADPCM)
     {
         YM_DELTAT *DELTAT = OPL->deltat;
@@ -1217,7 +1217,7 @@
     /* allocate OPL state space */
     state_size  = sizeof(FM_OPL);
     state_size += sizeof(OPL_CH)*max_ch;
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
     if(type&OPL_TYPE_ADPCM) state_size+= sizeof(YM_DELTAT);
 #endif
     /* allocate memory block */
@@ -1227,7 +1227,7 @@
     memset(ptr,0,state_size);
     OPL        = (FM_OPL *)ptr; ptr+=sizeof(FM_OPL);
     OPL->P_CH  = (OPL_CH *)ptr; ptr+=sizeof(OPL_CH)*max_ch;
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
     if(type&OPL_TYPE_ADPCM) OPL->deltat = (YM_DELTAT *)ptr; ptr+=sizeof(YM_DELTAT);
 #endif
     /* set channel state pointer */
@@ -1291,7 +1291,7 @@
     OPL->UpdateHandler = UpdateHandler;
     OPL->UpdateParam = param;
 }
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
 void OPLSetPortHandler(FM_OPL *OPL,OPL_PORTHANDLER_W PortHandler_w,OPL_PORTHANDLER_R PortHandler_r,int param)
 {
     OPL->porthandler_w = PortHandler_w;
fmopl.h (copie de travail) renamed from fmopl.h (révision 5668) +2 -2
Index: hw/fmopl.h
===================================================================
@@ -29,7 +29,7 @@
 #endif
 
 
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
 #include "ymdeltat.h"
 #endif
 
@@ -112,7 +112,7 @@
     int    max_ch;            /* maximum channel                   */
     /* Rythm sention */
     UINT8 rythm;        /* Rythm mode , key flag */
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
     /* Delta-T ADPCM unit (Y8950) */
     YM_DELTAT *deltat;            /* DELTA-T ADPCM       */
 #endif
#1 lore raw
Quoted 12 lines · Sylvain Petreolle

Signed-off by: Sylvain Petreolle<[email protected]>

Index: hw/fmopl.c
===================================================================

fmopl.c (copie de travail) renamed from fmopl.c (r?vision 5668) +1 -1
@@ -813,7 +813,7 @@
                 }
             }
             return;
-#if BUILD_Y8950
+#ifdef BUILD_Y8950

[..snip..]

Quoted 1 line

First of all fmopl.c is foreign code so touching it without clear need would be a mistake, secondly, the same effect can be achieved by #define BUILD_[Y8950|whatever] 0
in fmopl.h making for a much slimmer patch.

Signature · 1 line
mailto:[email protected]