Changeset 7203 in orxonox.OLD for branches/std/src/lib/graphics/graphics_engine.cc
- Timestamp:
- Mar 9, 2006, 5:28:10 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/graphics/graphics_engine.cc
r7193 r7203 169 169 { 170 170 // 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") 173 173 this->fullscreenFlag = SDL_FULLSCREEN; 174 174 175 175 // 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") 178 178 Texture::setTextureEnableState( true); 179 179 else … … 181 181 182 182 // 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 184 184 //resolution.debug(); 185 185 … … 262 262 * @param icon The name of the Icon on the Disc 263 263 */ 264 void GraphicsEngine::setWindowName(const char* windowName, const char*icon)265 { 266 SDL_Surface* iconSurf = SDL_LoadBMP(icon );264 void GraphicsEngine::setWindowName(const std::string& windowName, const std::string& icon) 265 { 266 SDL_Surface* iconSurf = SDL_LoadBMP(icon.c_str()); 267 267 if (iconSurf != NULL) 268 268 { 269 269 Uint32 colorkey = SDL_MapRGB(iconSurf->format, 0, 0, 0); 270 270 SDL_SetColorKey(iconSurf, SDL_SRCCOLORKEY, colorkey); 271 SDL_WM_SetIcon(iconSurf, NULL);271 SDL_WM_SetIcon(iconSurf, NULL); 272 272 SDL_FreeSurface(iconSurf); 273 273 } 274 274 275 SDL_WM_SetCaption (windowName , icon);275 SDL_WM_SetCaption (windowName.c_str(), icon.c_str()); 276 276 } 277 277
Note: See TracChangeset
for help on using the changeset viewer.