ALL: Don't use EventRecorder at all when not compiled in
This commit is contained in:
parent
bd82ca97c2
commit
4a7e4e5b22
9 changed files with 61 additions and 59 deletions
|
@ -98,7 +98,13 @@ OSystem_SDL::~OSystem_SDL() {
|
|||
delete _mixerManager;
|
||||
_mixerManager = 0;
|
||||
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
// HACK HACK HACK
|
||||
// This is nasty.
|
||||
delete g_eventRec.getTimerManager();
|
||||
#else
|
||||
delete _timerManager;
|
||||
#endif
|
||||
|
||||
_timerManager = 0;
|
||||
delete _mutexManager;
|
||||
|
@ -193,9 +199,15 @@ void OSystem_SDL::initBackend() {
|
|||
// Setup and start mixer
|
||||
_mixerManager->init();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
g_eventRec.registerMixerManager(_mixerManager);
|
||||
|
||||
g_eventRec.registerTimerManager(new SdlTimerManager());
|
||||
#else
|
||||
if (_timerManager == 0)
|
||||
_timerManager = new SdlTimerManager();
|
||||
#endif
|
||||
|
||||
if (_audiocdManager == 0) {
|
||||
// Audio CD support was removed with SDL 1.3
|
||||
|
@ -470,12 +482,18 @@ void OSystem_SDL::setupIcon() {
|
|||
|
||||
uint32 OSystem_SDL::getMillis(bool skipRecord) {
|
||||
uint32 millis = SDL_GetTicks();
|
||||
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
g_eventRec.processMillis(millis, skipRecord);
|
||||
#endif
|
||||
|
||||
return millis;
|
||||
}
|
||||
|
||||
void OSystem_SDL::delayMillis(uint msecs) {
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
if (!g_eventRec.processDelayMillis())
|
||||
#endif
|
||||
SDL_Delay(msecs);
|
||||
}
|
||||
|
||||
|
@ -498,11 +516,20 @@ Audio::Mixer *OSystem_SDL::getMixer() {
|
|||
|
||||
SdlMixerManager *OSystem_SDL::getMixerManager() {
|
||||
assert(_mixerManager);
|
||||
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
return g_eventRec.getMixerManager();
|
||||
#else
|
||||
return _mixerManager;
|
||||
#endif
|
||||
}
|
||||
|
||||
Common::TimerManager *OSystem_SDL::getTimerManager() {
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
return g_eventRec.getTimerManager();
|
||||
#else
|
||||
return _timerManager;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue