Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

bool OSystem::setGraphicsMode ( const char *  name  ) 

Switch to the graphics mode with the given name. If 'name' is unknown, or if switching to the new mode failed, this method returns false.

name the name of the new graphics mode
true if the switch was successful, false otherwise
This is implemented via the setGraphicsMode(int) method, as well as getSupportedGraphicsModes() and getDefaultGraphicsMode(). In particular, backends do not have to overload this!

Definition at line 36 of file system.cpp.

References getDefaultGraphicsMode(), getSupportedGraphicsModes(), OSystem::GraphicsMode::id, OSystem::GraphicsMode::name, and setGraphicsMode().

      if (!name)
            return false;

      // Special case for the 'default' filter
      if (!scumm_stricmp(name, "normal") || !scumm_stricmp(name, "default")) {
            return setGraphicsMode(getDefaultGraphicsMode());

      const GraphicsMode *gm = getSupportedGraphicsModes();

      while (gm->name) {
            if (!scumm_stricmp(gm->name, name)) {
                  return setGraphicsMode(gm->id);

      return false;

Generated by  Doxygen 1.6.0   Back to index