Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5024 in orxonox.OLD for orxonox/trunk/src/lib/graphics


Ignore:
Timestamp:
Aug 15, 2005, 1:00:21 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: icon and name get displayed correctly again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/graphics_engine.cc

    r4955 r5024  
    115115  if (this->isInit)
    116116    return -1;
    117   // initialize SDL_VIDEO
     117  //   initialize SDL_VIDEO
    118118  if (SDL_Init(SDL_INIT_VIDEO) == -1)
    119     {
    120       PRINTF(1)("could not initialize SDL Video\n");
     119  {
     120    PRINTF(1)("could not initialize SDL Video\n");
    121121      //      return -1;
    122     }
     122  }
    123123  // initialize SDL_GL-settings
    124124  this->setGLattribs();
     
    145145  this->setResolution(resX, resY, bbp);
    146146
    147   // TO DO: Create a cool icon and use it here
    148   char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100];
    149   sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(),  "pictures/orxonox-icon32x32.bmp");
    150   SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL);
    151   delete loadPic;
    152147  // Enable default GL stuff
    153148  glEnable(GL_DEPTH_TEST);
     
    165160void GraphicsEngine::setWindowName(const char* windowName, const char* icon)
    166161{
    167   // Set window labeling
     162  SDL_WM_SetIcon(SDL_LoadBMP(icon), NULL);
     163
    168164  SDL_WM_SetCaption (windowName, icon);
    169165}
Note: See TracChangeset for help on using the changeset viewer.