X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fr3000a.h;h=49afcb1cd6fa966b2402c563356e89619ae555db;hp=ea6f0e75f44b4b80656a95e1087ae06b4429d9db;hb=df717ca9bf196fd40134d16f94b7f3c774f2c897;hpb=ff2c28226e4ca1eea4cdbc9e9e7efa119c623196 diff --git a/libpcsxcore/r3000a.h b/libpcsxcore/r3000a.h index ea6f0e75..49afcb1c 100644 --- a/libpcsxcore/r3000a.h +++ b/libpcsxcore/r3000a.h @@ -206,17 +206,19 @@ void new_dyna_before_save(void); void new_dyna_after_save(void); void new_dyna_freeze(void *f, int mode); -#define new_dyna_set_event(e, c) { \ - s32 c_ = c; \ - u32 abs_ = psxRegs.cycle + c_; \ - s32 odi_ = next_interupt - psxRegs.cycle; \ +#define new_dyna_set_event_abs(e, abs) { \ + u32 abs_ = abs; \ + s32 di_ = next_interupt - abs_; \ event_cycles[e] = abs_; \ - if (c_ < odi_) { \ - /*printf("%u: next_interupt %d -> %d (%u)\n", psxRegs.cycle, odi_, c_, abs_);*/ \ + if (di_ > 0) { \ + /*printf("%u: next_interupt %u -> %u\n", psxRegs.cycle, next_interupt, abs_);*/ \ next_interupt = abs_; \ } \ } +#define new_dyna_set_event(e, c) \ + new_dyna_set_event_abs(e, psxRegs.cycle + (c)) + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #define _i32(x) *(s32 *)&x