reset SSG-EG swap flag (YM2612 MAME), Mouse IR support minor fixes

This commit is contained in:
ekeeke31 2008-08-14 11:54:37 +00:00
parent f674126a66
commit 19cede04f6
2 changed files with 14 additions and 10 deletions

View File

@ -494,7 +494,7 @@ static void wpad_update(s8 num, u8 i, u32 exp)
/* wiimote IR */ /* wiimote IR */
struct ir_t ir; struct ir_t ir;
WPAD_IR(num, &ir); WPAD_IR(num, &ir);
//if (ir.valid) if (ir.valid)
{ {
input.analog[2][0] = ir.x - old_x; input.analog[2][0] = ir.x - old_x;
if (input.analog[2][0] > 256) if (input.analog[2][0] > 256)

View File

@ -925,6 +925,9 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
i = 4; /* four operators per channel */ i = 4; /* four operators per channel */
do do
{ {
/* reset swap_flag (EkeEke) */
swap_flag = 0;
switch(SLOT->state) switch(SLOT->state)
{ {
case EG_ATT: /* attack phase */ case EG_ATT: /* attack phase */
@ -1053,6 +1056,7 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
in next instruction */ in next instruction */
SLOT->vol_out = out; SLOT->vol_out = out;
/* reverse SLOT inversion flag if required */
SLOT->ssgn ^= swap_flag; SLOT->ssgn ^= swap_flag;
SLOT++; SLOT++;