ref: 0df733f94b8bc11946b0af940d30f28ca67f02d8
parent: e11835232448831f8bd4a27c4f8d8a7aa78383b5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Mar 23 16:16:24 EDT 2014
games/snes: fix dspclock signed overflow (music stoping for minute)
--- a/sys/src/games/snes/snes.c
+++ b/sys/src/games/snes/snes.c
@@ -284,11 +284,11 @@
}
while(spcclock < 0)
spcclock += spcstep() * SPCDIV;
- if(stimerclock >= SPCDIV*16){
+ while(stimerclock >= SPCDIV*16){
spctimerstep();
stimerclock -= SPCDIV*16;
}
- if(dspclock >= SPCDIV){
+ while(dspclock >= SPCDIV){
dspstep();
dspclock -= SPCDIV;
}