[Scummvm-devel] Re: CVS: scummvm/base main.cpp,1.55,1.57

Eugene Sandulenko sev at scummvm.org
Mon Nov 22 17:41:14 CET 2004

 > 	// Start GFX transaction
 > 	system->beginGFXTransaction();
 > 		// See if the game should default to 1x scaler
 > 		if (useDefaultGraphicsMode && (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) {
 > 			system->setGraphicsMode(GFX_NORMAL);
 > 		// Init the engine (this might change the screen parameters
 > 		result = engine->init();
 > 	system->endGFXTransaction();
Albeit it looks logical, this will not work with most current
engines. In their init() method they do these things:

  o Start SMUSH playing (FT)
  o Set cursor shape (ITE)
  o Print OSD message (MT-32)
  o set up palette (BASS)

All these functions need access to screen, and that means that they
cannot be called inside of transaction.

There are 2 solutions. Either add yet another OSystem function
initGfx() or move transaction into init() method.


More information about the Scummvm-devel mailing list