mirror of https://github.com/mgba-emu/mgba.git
DS Timers: Fix DS9 timer context
This commit is contained in:
parent
616fa3956e
commit
c50cfc3b94
|
@ -54,34 +54,34 @@ void DSTimerInit(struct DS* ds) {
|
||||||
ds->ds7.timers[0].event.context = &ds->ds7;
|
ds->ds7.timers[0].event.context = &ds->ds7;
|
||||||
ds->ds7.timers[0].event.priority = 0x20;
|
ds->ds7.timers[0].event.priority = 0x20;
|
||||||
ds->ds7.timers[1].event.name = "DS7 Timer 1";
|
ds->ds7.timers[1].event.name = "DS7 Timer 1";
|
||||||
ds->ds7.timers[0].event.callback = DSTimerUpdate1;
|
ds->ds7.timers[1].event.callback = DSTimerUpdate1;
|
||||||
ds->ds7.timers[0].event.context = &ds->ds7;
|
ds->ds7.timers[1].event.context = &ds->ds7;
|
||||||
ds->ds7.timers[1].event.priority = 0x21;
|
ds->ds7.timers[1].event.priority = 0x21;
|
||||||
ds->ds7.timers[2].event.name = "DS7 Timer 2";
|
ds->ds7.timers[2].event.name = "DS7 Timer 2";
|
||||||
ds->ds7.timers[0].event.callback = DSTimerUpdate2;
|
ds->ds7.timers[2].event.callback = DSTimerUpdate2;
|
||||||
ds->ds7.timers[0].event.context = &ds->ds7;
|
ds->ds7.timers[2].event.context = &ds->ds7;
|
||||||
ds->ds7.timers[2].event.priority = 0x22;
|
ds->ds7.timers[2].event.priority = 0x22;
|
||||||
ds->ds7.timers[3].event.name = "DS7 Timer 3";
|
ds->ds7.timers[3].event.name = "DS7 Timer 3";
|
||||||
ds->ds7.timers[0].event.callback = DSTimerUpdate3;
|
ds->ds7.timers[3].event.callback = DSTimerUpdate3;
|
||||||
ds->ds7.timers[0].event.context = &ds->ds7;
|
ds->ds7.timers[3].event.context = &ds->ds7;
|
||||||
ds->ds7.timers[3].event.priority = 0x23;
|
ds->ds7.timers[3].event.priority = 0x23;
|
||||||
|
|
||||||
memset(ds->ds9.timers, 0, sizeof(ds->ds9.timers));
|
memset(ds->ds9.timers, 0, sizeof(ds->ds9.timers));
|
||||||
ds->ds9.timers[0].event.name = "DS9 Timer 0";
|
ds->ds9.timers[0].event.name = "DS9 Timer 0";
|
||||||
ds->ds9.timers[0].event.callback = DSTimerUpdate0;
|
ds->ds9.timers[0].event.callback = DSTimerUpdate0;
|
||||||
ds->ds9.timers[0].event.context = ds;
|
ds->ds9.timers[0].event.context = &ds->ds9;
|
||||||
ds->ds9.timers[0].event.priority = 0x20;
|
ds->ds9.timers[0].event.priority = 0x20;
|
||||||
ds->ds9.timers[1].event.name = "DS9 Timer 1";
|
ds->ds9.timers[1].event.name = "DS9 Timer 1";
|
||||||
ds->ds9.timers[1].event.callback = DSTimerUpdate1;
|
ds->ds9.timers[1].event.callback = DSTimerUpdate1;
|
||||||
ds->ds9.timers[1].event.context = ds;
|
ds->ds9.timers[1].event.context = &ds->ds9;
|
||||||
ds->ds9.timers[1].event.priority = 0x21;
|
ds->ds9.timers[1].event.priority = 0x21;
|
||||||
ds->ds9.timers[2].event.name = "DS9 Timer 2";
|
ds->ds9.timers[2].event.name = "DS9 Timer 2";
|
||||||
ds->ds9.timers[2].event.callback = DSTimerUpdate2;
|
ds->ds9.timers[2].event.callback = DSTimerUpdate2;
|
||||||
ds->ds9.timers[2].event.context = ds;
|
ds->ds9.timers[2].event.context = &ds->ds9;
|
||||||
ds->ds9.timers[2].event.priority = 0x22;
|
ds->ds9.timers[2].event.priority = 0x22;
|
||||||
ds->ds9.timers[3].event.name = "DS9 Timer 3";
|
ds->ds9.timers[3].event.name = "DS9 Timer 3";
|
||||||
ds->ds9.timers[3].event.callback = DSTimerUpdate3;
|
ds->ds9.timers[3].event.callback = DSTimerUpdate3;
|
||||||
ds->ds9.timers[3].event.context = ds;
|
ds->ds9.timers[3].event.context = &ds->ds9;
|
||||||
ds->ds9.timers[3].event.priority = 0x23;
|
ds->ds9.timers[3].event.priority = 0x23;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue