[Scummvm-cvs-logs] CVS: scummvm/sound mpu401.cpp,1.19,1.20
Jamieson Christian
jamieson630 at users.sourceforge.net
Sat Sep 27 17:00:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv21261/scummvm/sound
Modified Files:
mpu401.cpp
Log Message:
Timer services are now available through g_timer, so
you don't have to go through the Engine to get to them.
Index: mpu401.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mpu401.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- mpu401.cpp 26 Sep 2003 14:05:33 -0000 1.19
+++ mpu401.cpp 27 Sep 2003 23:59:00 -0000 1.20
@@ -24,6 +24,7 @@
#include "common/timer.h"
#include "common/util.h" // for ARRAYSIZE
+extern Timer *g_timer;
void MidiChannel_MPU401::init(MidiDriver_MPU401 *owner, byte channel) {
_owner = owner;
@@ -94,9 +95,8 @@
}
void MidiDriver_MPU401::close() {
- // FIXME: I'd really prefer a g_timer instead of going through g_engine
if (_timer_proc)
- g_engine->_timer->releaseProcedure (_timer_proc);
+ g_timer->releaseProcedure (_timer_proc);
_timer_proc = 0;
for (int i = 0; i < 16; ++i)
send (0x7B << 8 | 0xB0 | i);
@@ -129,12 +129,11 @@
}
void MidiDriver_MPU401::setTimerCallback (void *timer_param, TimerProc timer_proc) {
- // FIXME: I'd really prefer a g_timer instead of going through g_engine
if (!_timer_proc || !timer_proc) {
if (_timer_proc)
- g_engine->_timer->releaseProcedure (_timer_proc);
+ g_timer->releaseProcedure (_timer_proc);
_timer_proc = timer_proc;
if (timer_proc)
- g_engine->_timer->installProcedure (timer_proc, 10000, timer_param);
+ g_timer->installProcedure (timer_proc, 10000, timer_param);
}
}
More information about the Scummvm-git-logs
mailing list