From c50cfc3b941963fbba6d48c9ec22ecd03b8c935c Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 4 Jan 2017 00:46:42 -0800 Subject: [PATCH] DS Timers: Fix DS9 timer context --- src/ds/timer.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ds/timer.c b/src/ds/timer.c index 748908c58..2cd661b7b 100644 --- a/src/ds/timer.c +++ b/src/ds/timer.c @@ -54,34 +54,34 @@ void DSTimerInit(struct DS* ds) { ds->ds7.timers[0].event.context = &ds->ds7; ds->ds7.timers[0].event.priority = 0x20; ds->ds7.timers[1].event.name = "DS7 Timer 1"; - ds->ds7.timers[0].event.callback = DSTimerUpdate1; - ds->ds7.timers[0].event.context = &ds->ds7; + ds->ds7.timers[1].event.callback = DSTimerUpdate1; + ds->ds7.timers[1].event.context = &ds->ds7; ds->ds7.timers[1].event.priority = 0x21; ds->ds7.timers[2].event.name = "DS7 Timer 2"; - ds->ds7.timers[0].event.callback = DSTimerUpdate2; - ds->ds7.timers[0].event.context = &ds->ds7; + ds->ds7.timers[2].event.callback = DSTimerUpdate2; + ds->ds7.timers[2].event.context = &ds->ds7; ds->ds7.timers[2].event.priority = 0x22; ds->ds7.timers[3].event.name = "DS7 Timer 3"; - ds->ds7.timers[0].event.callback = DSTimerUpdate3; - ds->ds7.timers[0].event.context = &ds->ds7; + ds->ds7.timers[3].event.callback = DSTimerUpdate3; + ds->ds7.timers[3].event.context = &ds->ds7; ds->ds7.timers[3].event.priority = 0x23; memset(ds->ds9.timers, 0, sizeof(ds->ds9.timers)); ds->ds9.timers[0].event.name = "DS9 Timer 0"; 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[1].event.name = "DS9 Timer 1"; 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[2].event.name = "DS9 Timer 2"; 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[3].event.name = "DS9 Timer 3"; 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; }