From bcbfce11ff8d3a043c0a7af9480d8288b2db2165 Mon Sep 17 00:00:00 2001 From: Barry Harris <44396066+barry65536@users.noreply.github.com> Date: Thu, 16 Feb 2012 20:04:43 +0000 Subject: [PATCH] Fix VC compile --- src/burn/snd/fmopl.c | 12 ++++++++---- src/burn/snd/ym2413.c | 7 +++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/burn/snd/fmopl.c b/src/burn/snd/fmopl.c index 1046d371d..dcbc653fc 100644 --- a/src/burn/snd/fmopl.c +++ b/src/burn/snd/fmopl.c @@ -2533,13 +2533,15 @@ void FMOPLScan(INT32 nType, INT32 which, INT32 nAction, INT32 *pnMin) } if (nAction & ACB_DRIVER_DATA) { - for (INT32 ch = 0; ch < 9; ch++) { + INT32 ch; + INT32 slot; + for (ch = 0; ch < 9; ch++) { OPL_CH *CH = &OPL->P_CH[ch]; SCAN_VAR(CH->block_fnum); SCAN_VAR(CH->kcode); - for (INT32 slot = 0; slot < 2; slot++) { + for (slot = 0; slot < 2; slot++) { OPL_SLOT *SLOT = &CH->SLOT[slot]; SCAN_VAR(SLOT->ar); @@ -2611,14 +2613,16 @@ void FMOPLScan(INT32 nType, INT32 which, INT32 nAction, INT32 *pnMin) SCAN_VAR(OPL->mode); if (nAction & ACB_WRITE) { - for (INT32 ch = 0; ch < 9; ch++) { + INT32 ch; + INT32 slot; + for (ch = 0; ch < 9; ch++) { OPL_CH *CH = &OPL->P_CH[ch]; UINT32 block_fnum = CH->block_fnum; CH->ksl_base = ksl_tab[block_fnum >> 6]; CH->fc = OPL->fn_tab[block_fnum & 0x03ff] >> (7 - (block_fnum >> 10)); - for (INT32 slot = 0; slot < 2; slot++) { + for (slot = 0; slot < 2; slot++) { OPL_SLOT *SLOT = &CH->SLOT[slot]; SLOT->ksr = CH->kcode >> SLOT->KSR; diff --git a/src/burn/snd/ym2413.c b/src/burn/snd/ym2413.c index 0b3141eea..fc39f2184 100644 --- a/src/burn/snd/ym2413.c +++ b/src/burn/snd/ym2413.c @@ -2166,6 +2166,9 @@ void YM2413Scan(INT32 which, INT32 nAction) YM2413 *chip = OPLL_YM2413[which]; if (nAction & ACB_DRIVER_DATA) { + INT32 chnum; + INT32 slotnum; + SCAN_VAR(chip->instvol_r); SCAN_VAR(chip->eg_cnt); SCAN_VAR(chip->eg_timer); @@ -2183,7 +2186,7 @@ void YM2413Scan(INT32 which, INT32 nAction) SCAN_VAR(chip->address); SCAN_VAR(chip->status); - for (INT32 chnum = 0; chnum < 9; chnum++) { + for (chnum = 0; chnum < 9; chnum++) { YM2413_OPLL_CH *ch = &chip->P_CH[chnum]; SCAN_VAR(ch->block_fnum); @@ -2192,7 +2195,7 @@ void YM2413Scan(INT32 which, INT32 nAction) SCAN_VAR(ch->kcode); SCAN_VAR(ch->sus); - for (INT32 slotnum = 0; slotnum < 2; slotnum++) { + for (slotnum = 0; slotnum < 2; slotnum++) { YM2413_OPLL_SLOT *sl = &ch->SLOT[slotnum]; SCAN_VAR(sl->ar);