aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-07-23 07:06:26 +0000
committerTorbjörn Andersson2006-07-23 07:06:26 +0000
commitb845eb9b996a3d83208a02da5f25eaf8103fa665 (patch)
tree9a9b09807ce386432b9bcf3cedbb2ec832556fc8
parent15f08bf2687977feac84343e65a091bd30f9367e (diff)
downloadscummvm-rg350-b845eb9b996a3d83208a02da5f25eaf8103fa665.tar.gz
scummvm-rg350-b845eb9b996a3d83208a02da5f25eaf8103fa665.tar.bz2
scummvm-rg350-b845eb9b996a3d83208a02da5f25eaf8103fa665.zip
Initialise the screen before creating the music driver. The MT-32 driver wants
to draw to the screen. svn-id: r23574
-rw-r--r--engines/kyra/kyra.cpp9
1 files changed, 5 insertions, 4 deletions
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);