X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2Fpwm.c;h=8e365892689d604bdc263d8373fe6b70c320c7eb;hb=1f1ff763e661bab664151c4821c65dad35777976;hp=64d672238e0bf54ff6de5620baa657e2f7b0e50c;hpb=04092e329bbd050073d42defcd609550d8545e74;p=picodrive.git diff --git a/pico/32x/pwm.c b/pico/32x/pwm.c index 64d6722..8e36589 100644 --- a/pico/32x/pwm.c +++ b/pico/32x/pwm.c @@ -47,7 +47,7 @@ void p32x_timers_recalc(void) } // PWM irq for every tm samples -void p32x_timers_do(int new_line) +void p32x_timers_do(int line_call) { int tm, cnt, i; @@ -55,17 +55,17 @@ void p32x_timers_do(int new_line) { tm = (Pico32x.regs[0x30 / 2] & 0x0f00) >> 8; if (tm != 0) { - if (new_line) + if (line_call) Pico32x.pwm_irq_sample_cnt += pwm_line_samples; if (Pico32x.pwm_irq_sample_cnt >= (tm << 16)) { Pico32x.pwm_irq_sample_cnt -= tm << 16; Pico32x.sh2irqs |= P32XI_PWM; - p32x_update_irls(); + p32x_update_irls(!line_call); } } } - if (!new_line) + if (!line_call) return; for (i = 0; i < 2; i++) {