aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfsound/spu.c
diff options
context:
space:
mode:
authornotaz2014-12-21 00:36:00 +0200
committernotaz2014-12-21 02:31:24 +0200
commitc4c66b22ae607aa8dc5e6983f7ab030ead01faae (patch)
treea3938743f6ea29be8acb15eb1d3e203b69e9e483 /plugins/dfsound/spu.c
parentfb01e82a3453b4b068fde274a42df336e778d8d3 (diff)
downloadpcsx_rearmed-c4c66b22ae607aa8dc5e6983f7ab030ead01faae.tar.gz
pcsx_rearmed-c4c66b22ae607aa8dc5e6983f7ab030ead01faae.tar.bz2
pcsx_rearmed-c4c66b22ae607aa8dc5e6983f7ab030ead01faae.zip
spu: avoid NULL pSpuIrq
CTR sets 0 irq address, and savestates mess up
Diffstat (limited to 'plugins/dfsound/spu.c')
-rw-r--r--plugins/dfsound/spu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index ca362b7..2c13ca1 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -738,7 +738,7 @@ void do_samples(unsigned int cycles_to)
// an IRQ.
if (unlikely((spu.spuCtrl & CTRL_IRQ)
- && spu.pSpuIrq && spu.pSpuIrq < spu.spuMemC+0x1000))
+ && spu.pSpuIrq < spu.spuMemC+0x1000))
{
int irq_pos = (spu.pSpuIrq - spu.spuMemC) / 2 & 0x1ff;
int left = (irq_pos - spu.decode_pos) & 0x1ff;
@@ -1027,7 +1027,7 @@ long CALLBACK SPUinit(void)
spu.spuAddr = 0xffffffff;
spu.decode_pos = 0;
memset((void *)s_chan, 0, sizeof(s_chan));
- spu.pSpuIrq = 0;
+ spu.pSpuIrq = spu.spuMemC;
SetupStreams(); // prepare streaming