Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 20, 2011, 12:10:36 AM (13 years ago)
Author:
rgrieder
Message:

Fixed PATH fiddling for module/plugin loading.

File:
1 edited

Legend:

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

    r8231 r8271  
    247247#endif
    248248
     249#ifdef ORXONOX_PLATFORM_WINDOWS
    249250        // Add OGRE plugin path to the environment. That way one plugin could
    250251        // also depend on another without problems on Windows
    251         std::string pathVariable(getenv("PATH"));
    252         putenv(const_cast<char*>(("PATH=" + pathVariable + ';' + pluginPath).c_str()));
     252        const char* currentPATH = getenv("PATH");
     253        std::string newPATH = pluginPath;
     254        if (currentPATH != NULL)
     255            newPATH = std::string(currentPATH) + ';' + newPATH;
     256        putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
     257#endif
    253258
    254259        // Do some SubString magic to get the comma separated list of plugins
Note: See TracChangeset for help on using the changeset viewer.