Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 5, 2009, 2:58:42 PM (16 years ago)
Author:
rgrieder
Message:

Using POSIX forward slashes on Windows as well. There is only one exception: Plugin loading in GSGraphics.cc

  • Removed Core::getFooPathPOSIXString()
  • Modified Core::getFooPathString() to return POSIX path strings.

This should problems when exchanging file strings over the network.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/gamestates/GSGraphics.cc

    r2710 r2750  
    136136        // load debug overlay
    137137        COUT(3) << "Loading Debug Overlay..." << std::endl;
    138         this->debugOverlay_ = new XMLFile((Core::getMediaPath() / "overlay" / "debug.oxo").file_string());
     138        this->debugOverlay_ = new XMLFile((Core::getMediaPath() / "overlay" / "debug.oxo").string());
    139139        Loader::open(debugOverlay_);
    140140
     
    304304        // create our own log that we can listen to
    305305        Ogre::Log *myLog;
    306         myLog = ogreLogger_->createLog(ogreLogFilepath.file_string(), true, false, false);
     306        myLog = ogreLogger_->createLog(ogreLogFilepath.string(), true, false, false);
    307307        COUT(4) << "Ogre Log created" << std::endl;
    308308
     
    317317            // create a zero sized file
    318318            std::ofstream creator;
    319             creator.open(ogreConfigFilepath.file_string().c_str());
     319            creator.open(ogreConfigFilepath.string().c_str());
    320320            creator.close();
    321321        }
    322322
    323323        // Leave plugins file empty. We're going to do that part manually later
    324         ogreRoot_ = new Ogre::Root("", ogreConfigFilepath.file_string(), ogreLogFilepath.file_string());
     324        ogreRoot_ = new Ogre::Root("", ogreConfigFilepath.string(), ogreLogFilepath.string());
    325325
    326326        COUT(3) << "Ogre set up done." << std::endl;
     
    336336        // Do some SubString magic to get the comma separated list of plugins
    337337        SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0');
     338        // Use backslash paths on Windows! file_string() already does that though.
    338339        for (unsigned int i = 0; i < plugins.size(); ++i)
    339340            ogreRoot_->loadPlugin((folder / plugins[i]).file_string());
     
    356357        try
    357358        {
    358             cf.load((Core::getMediaPath() / resourceFile_).file_string());
     359            cf.load((Core::getMediaPath() / resourceFile_).string());
    359360        }
    360361        catch (...)
     
    382383
    383384                    Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
    384                         (Core::getMediaPath() / archName).directory_string(), typeName, secName);
     385                        (Core::getMediaPath() / archName).string(), typeName, secName);
    385386                }
    386387            }
Note: See TracChangeset for help on using the changeset viewer.