Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 9, 2006, 5:28:10 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: compiles again, BUT well…. i do not expect it to run anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/graphics/graphics_engine.cc

    r7193 r7203  
    169169{
    170170  // looking if we are in fullscreen-mode
    171   const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
    172   if (strchr(fullscreen, '1') || !strcasecmp(fullscreen, "true"))
     171  const std::string fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
     172  if (fullscreen[0] == '1' || fullscreen == "true")
    173173    this->fullscreenFlag = SDL_FULLSCREEN;
    174174
    175175  // looking if we are in fullscreen-mode
    176   const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
    177   if (strchr(textures, '1') || !strcasecmp(textures, "true"))
     176  const std::string textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
     177  if (textures[0] == '1' || textures == "true")
    178178    Texture::setTextureEnableState( true);
    179179  else
     
    181181
    182182  // searching for a usefull resolution
    183   SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480"), 'x');
     183  SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480").c_str(), 'x'); ///FIXME
    184184  //resolution.debug();
    185185
     
    262262 * @param icon The name of the Icon on the Disc
    263263 */
    264 void GraphicsEngine::setWindowName(const char* windowName, const char* icon)
    265 {
    266   SDL_Surface* iconSurf = SDL_LoadBMP(icon);
     264void GraphicsEngine::setWindowName(const std::string& windowName, const std::string& icon)
     265{
     266  SDL_Surface* iconSurf = SDL_LoadBMP(icon.c_str());
    267267  if (iconSurf != NULL)
    268268  {
    269269    Uint32 colorkey = SDL_MapRGB(iconSurf->format, 0, 0, 0);
    270270    SDL_SetColorKey(iconSurf, SDL_SRCCOLORKEY, colorkey);
    271     SDL_WM_SetIcon(iconSurf,NULL);
     271    SDL_WM_SetIcon(iconSurf, NULL);
    272272    SDL_FreeSurface(iconSurf);
    273273  }
    274274
    275   SDL_WM_SetCaption (windowName, icon);
     275  SDL_WM_SetCaption (windowName.c_str(), icon.c_str());
    276276}
    277277
Note: See TracChangeset for help on using the changeset viewer.