diff options
author | Max Horn | 2005-01-08 18:37:28 +0000 |
---|---|---|
committer | Max Horn | 2005-01-08 18:37:28 +0000 |
commit | 65a4044203f2d26edb26a7677dd1a6107d24adcb (patch) | |
tree | dc750f88b066a205d51e738abb904057ec8554d3 /base | |
parent | c257460bc5474da6ce87da2191ed77f4de76a764 (diff) | |
download | scummvm-rg350-65a4044203f2d26edb26a7677dd1a6107d24adcb.tar.gz scummvm-rg350-65a4044203f2d26edb26a7677dd1a6107d24adcb.tar.bz2 scummvm-rg350-65a4044203f2d26edb26a7677dd1a6107d24adcb.zip |
Fix bug #1097467 (COMI: cursor is invisible at "insert CD" message)
svn-id: r16490
Diffstat (limited to 'base')
-rw-r--r-- | base/main.cpp | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/base/main.cpp b/base/main.cpp index 1fbaa96ff7..1cfd92a35b 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -187,20 +187,7 @@ static void do_memory_test(void) { int gDebugLevel = 0; -static bool launcherDialog(GameDetector &detector, OSystem &system) { - - system.beginGFXTransaction(); - // Set the user specified graphics mode (if any). - system.setGraphicsMode(ConfMan.get("gfx_mode").c_str()); - - // GUI is (currently) always running at 320x200 - system.initSize(320, 200); - system.endGFXTransaction(); - - - // Clear the main screen - system.clearScreen(); - +static void setupDummyPalette(OSystem &system) { // FIXME - mouse cursors are currently always set via 8 bit data. // Thus for now we need to setup a dummy palette. On the long run, we might // want to add a setMouseCursor_overlay() method to OSystem, which would serve @@ -227,6 +214,24 @@ static bool launcherDialog(GameDetector &detector, OSystem &system) { }; system.setPalette(dummy_palette, 0, 16); +} + +static bool launcherDialog(GameDetector &detector, OSystem &system) { + + system.beginGFXTransaction(); + // Set the user specified graphics mode (if any). + system.setGraphicsMode(ConfMan.get("gfx_mode").c_str()); + + // GUI is (currently) always running at 320x200 + system.initSize(320, 200); + system.endGFXTransaction(); + + + // Clear the main screen + system.clearScreen(); + + // Setup a dummy palette, for the mouse cursor + setupDummyPalette(system); #if defined(_WIN32_WCE) CELauncherDialog dlg(detector); @@ -383,6 +388,10 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) { // Unless a game was specified, show the launcher dialog if (detector._targetName.isEmpty()) running = launcherDialog(detector, system); + else + // Setup a dummy palette, for the mouse cursor, in case an error + // dialog has to be shown. See bug #1097467. + setupDummyPalette(system); // FIXME: We're now looping the launcher. This, of course, doesn't // work as well as it should. In theory everything should be destroyed |