diff options
author | João Silva | 2017-02-12 01:52:03 +0000 |
---|---|---|
committer | João Silva | 2017-02-12 01:52:03 +0000 |
commit | 3777d1fcf4232cde426f46b7ee5c374fd949b1b0 (patch) | |
tree | e76f38bc1bac83bab19daea51d63ed87236e047e /source/apu.c | |
parent | b6006bc542f89ad1b7086268f851f0ba880ad6cd (diff) | |
download | snes9x2005-3777d1fcf4232cde426f46b7ee5c374fd949b1b0.tar.gz snes9x2005-3777d1fcf4232cde426f46b7ee5c374fd949b1b0.tar.bz2 snes9x2005-3777d1fcf4232cde426f46b7ee5c374fd949b1b0.zip |
Type fixes. Fixes from snes9x 1.50. Minor changes and optimizations.
Diffstat (limited to 'source/apu.c')
-rw-r--r-- | source/apu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/apu.c b/source/apu.c index a28469d..521d9b3 100644 --- a/source/apu.c +++ b/source/apu.c @@ -77,7 +77,6 @@ void S9xResetAPU() for (i = 0; i < 3; i++) { APU.TimerEnabled [i] = false; - APU.TimerValueWritten [i] = 0; APU.TimerTarget [i] = 0; APU.Timer [i] = 0; } @@ -388,9 +387,9 @@ void S9xSetAPUControl(uint8_t byte) if ((APU.TimerTarget [2] = IAPU.RAM [0xfc]) == 0) APU.TimerTarget [2] = 0x100; } - APU.TimerEnabled [0] = byte & 1; - APU.TimerEnabled [1] = (byte & 2) >> 1; - APU.TimerEnabled [2] = (byte & 4) >> 2; + APU.TimerEnabled [0] = (bool) (byte & 1); + APU.TimerEnabled [1] = (bool) (byte & 2); + APU.TimerEnabled [2] = (bool) (byte & 4); if (byte & 0x10) IAPU.RAM [0xF4] = IAPU.RAM [0xF5] = 0; |