BACKENDS: Use a virtual function for creating the SDL audio CD manager
This commit is contained in:
parent
30e68efac4
commit
55a87c59b6
2 changed files with 15 additions and 9 deletions
|
@ -245,15 +245,7 @@ void OSystem_SDL::initBackend() {
|
|||
_timerManager = new SdlTimerManager();
|
||||
#endif
|
||||
|
||||
if (_audiocdManager == 0) {
|
||||
// Audio CD support was removed with SDL 2.0
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
_audiocdManager = new DefaultAudioCDManager();
|
||||
#else
|
||||
_audiocdManager = new SdlAudioCDManager();
|
||||
#endif
|
||||
|
||||
}
|
||||
_audiocdManager = createAudioCDManager();
|
||||
|
||||
// Setup a custom program icon.
|
||||
_window->setupIcon();
|
||||
|
@ -491,6 +483,15 @@ Common::TimerManager *OSystem_SDL::getTimerManager() {
|
|||
#endif
|
||||
}
|
||||
|
||||
AudioCDManager *OSystem_SDL::createAudioCDManager() {
|
||||
// Audio CD support was removed with SDL 1.3
|
||||
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
||||
return new DefaultAudioCDManager();
|
||||
#else
|
||||
return new SdlAudioCDManager();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
||||
const OSystem::GraphicsMode *OSystem_SDL::getSupportedGraphicsModes() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue