mirror of
https://github.com/libretro/mgba.git
synced 2024-11-23 16:10:01 +00:00
GB Serialize: Fix timer serialization
This commit is contained in:
parent
dde155d0dd
commit
5ce943c580
1
CHANGES
1
CHANGES
@ -170,6 +170,7 @@ Bugfixes:
|
||||
- GBA SIO: Improve SIO Normal dummy driver (fixes mgba.io/i/520)
|
||||
- Qt: Fix patch loading while a game is running
|
||||
- Qt: Fix shader selector on Ubuntu (fixes mgba.io/i/767)
|
||||
- GB Serialize: Fix timer serialization
|
||||
Misc:
|
||||
- Qt: Add language selector
|
||||
- GBA Timer: Improve accuracy of timers
|
||||
|
@ -118,7 +118,7 @@ void GBTimerSerialize(const struct GBTimer* timer, struct GBSerializedState* sta
|
||||
STORE_32LE(timer->event.when - mTimingCurrentTime(&timer->p->timing), 0, &state->timer.nextEvent);
|
||||
STORE_32LE(timer->irq.when - mTimingCurrentTime(&timer->p->timing), 0, &state->timer.nextIRQ);
|
||||
GBSerializedTimerFlags flags = GBSerializedTimerFlagsSetIrqPending(0, mTimingIsScheduled(&timer->p->timing, &timer->irq));
|
||||
STORE_32LE(flags, 0, &state->timer.flags);
|
||||
state->timer.flags = flags;
|
||||
}
|
||||
|
||||
void GBTimerDeserialize(struct GBTimer* timer, const struct GBSerializedState* state) {
|
||||
@ -130,8 +130,7 @@ void GBTimerDeserialize(struct GBTimer* timer, const struct GBSerializedState* s
|
||||
LOAD_32LE(when, 0, &state->timer.nextEvent);
|
||||
mTimingSchedule(&timer->p->timing, &timer->event, when);
|
||||
|
||||
GBSerializedTimerFlags flags;
|
||||
LOAD_32LE(flags, 0, &state->timer.flags);
|
||||
GBSerializedTimerFlags flags = state->timer.flags;
|
||||
|
||||
if (GBSerializedTimerFlagsIsIrqPending(flags)) {
|
||||
LOAD_32LE(when, 0, &state->timer.nextIRQ);
|
||||
|
Loading…
Reference in New Issue
Block a user