diff options
author | James Brown | 2003-01-13 18:59:53 +0000 |
---|---|---|
committer | James Brown | 2003-01-13 18:59:53 +0000 |
commit | 0b46f85b7edb80a3c85e2690ca091d6e9e31f28c (patch) | |
tree | 7931a8976e726c6c81032c3cb862709009335ad8 | |
parent | 62780b34d7448373631afb3d8c81c86d4919c1aa (diff) | |
download | scummvm-rg350-0b46f85b7edb80a3c85e2690ca091d6e9e31f28c.tar.gz scummvm-rg350-0b46f85b7edb80a3c85e2690ca091d6e9e31f28c.tar.bz2 scummvm-rg350-0b46f85b7edb80a3c85e2690ca091d6e9e31f28c.zip |
Early init of the scaler - to prevent ComI trying to use a huge window by default.
This may require porters to make a small backend change, not to reinit a scaler on hotswap if the display has not been init_size'ed.
svn-id: r6449
-rw-r--r-- | backends/sdl/sdl.cpp | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index d6e6e8991d..eaa7a03642 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -191,6 +191,8 @@ void OSystem_SDL::unload_gfx_mode() { } void OSystem_SDL::hotswap_gfx_mode() { + if (!_screen) + return; // Keep around the old _screen & _tmpscreen so we can restore the screen data // after the mode switch. diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index b3dc865e0e..9e2ef68312 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -124,6 +124,12 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) _sound->_sound_volume_sfx = detector->_sfx_volume; _sound->_sound_volume_music = detector->_music_volume; + // Override global scaler with any game-specific define + if (g_config->get("gfx_mode")) { + prop.gfx_mode = detector->parseGraphicsMode(g_config->get("gfx_mode")); + syst->property(OSystem::PROP_SET_GFX_MODE, &prop); + } + /* Initialize backend */ syst->init_size(_realWidth, _realHeight); prop.cd_num = detector->_cdrom; @@ -136,11 +142,6 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) syst->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0); } - // Override global scaler with any game-specific define - if (g_config->get("gfx_mode")) { - prop.gfx_mode = detector->parseGraphicsMode(g_config->get("gfx_mode")); - syst->property(OSystem::PROP_SET_GFX_MODE, &prop); - } #ifndef __GP32__ //ph0x FIXME, "quick dirty hack" /* Bind the mixer to the system => mixer will be invoked |