From b845eb9b996a3d83208a02da5f25eaf8103fa665 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 23 Jul 2006 07:06:26 +0000 Subject: Initialise the screen before creating the music driver. The MT-32 driver wants to draw to the screen. svn-id: r23574 --- engines/kyra/kyra.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index cc2b866220..2c346f9fac 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -136,6 +136,11 @@ int KyraEngine::init() { Common::addSpecialDebugLevel(kDebugLevelSequence, "Sequence", "Sequence debug level"); Common::addSpecialDebugLevel(kDebugLevelMovie, "Movie", "Movie debug level"); + _screen = new Screen(this, _system); + assert(_screen); + if (!_screen->init()) + error("_screen->init() failed"); + // for now we prefer Adlib over native MIDI int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB/* | MDT_PREFER_MIDI*/); @@ -173,10 +178,6 @@ int KyraEngine::init() { } _sound->setVolume(255); - _screen = new Screen(this, _system); - assert(_screen); - if (!_screen->init()) - error("_screen->init() failed"); _res = new Resource(this); assert(_res); _sprites = new Sprites(this, _system); -- cgit v1.2.3