Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 12, 2011, 7:24:16 PM (13 years ago)
Author:
landauf
Message:

added feature: ogre config dialog keeps showing up on startup until the user loads a level the first time.

the reason is: if the user closes the game (or it crashes) before loading a level, there was maybe a problem with the ogre config, so we show the menu again to modify it.
if the user manages to start a level, at least the menu shows correctly, hence he can change the config in the orxonox settings from now on if needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r7868 r7870  
    5454#include "ConfigValueIncludes.h"
    5555#include "CoreIncludes.h"
     56#include "Core.h"
    5657#include "Game.h"
    5758#include "GameMode.h"
     
    303304        CCOUT(4) << "Configuring Renderer" << std::endl;
    304305
    305         if (!ogreRoot_->restoreConfig())
     306        if (!ogreRoot_->restoreConfig() || Core::getInstance().getOgreConfigTimestamp() > Core::getInstance().getLastLevelTimestamp())
     307        {
    306308            if (!ogreRoot_->showConfigDialog())
    307309                ThrowException(InitialisationFailed, "OGRE graphics configuration dialogue canceled.");
     310            else
     311                Core::getInstance().updateOgreConfigTimestamp();
     312        }
    308313
    309314        CCOUT(4) << "Creating render window" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.