[SDL] libtool question

Enrico Weigelt weigelt at metux.de
Tue Sep 20 12:54:33 PDT 2005


---------------------------- Original Message ----------------------------
Subject: Re: [SDL] BMP is not drawed
From:    sebastian at barfoot.mine.nu
Date:    Thu, September 8, 2005 7:55 am
To:      "A list for developers using the SDL library. \(includes
SDL-announce\)" <sdl at libsdl.org>
--------------------------------------------------------------------------

Hmmm strange.

I've got a header named main.h in this header is a function:

------------------------------------------------------------
/* Diese Funktion initalisiert SDL und setzte den Videomodus. */
int initgame(SDL_Surface *target) {
   if (SDL_Init(SDL_INIT_VIDEO) < 0) {
      fprintf(stderr, "SDL konnte nicht initialisiert werden: %s\n",
                       SDL_GetError());
      exit(1);
   }

   /* Videomodus setzen */
   target = SDL_SetVideoMode(640, 480, 0, 0);
   if (!target) {
      fprintf(stderr, "Konnte Bildschirmmodus nicht setzen: %s\n",
                       SDL_GetError());
      exit(2);
   }

   /* Netzwerkunterstützung aktivieren */
   if(SDLNet_Init() < 0) {
      fprintf(stderr, "Konnte Netzwerk nicht initialisieren: %s\n",
SDLNet_GetError());
      exit(3);
   }
   return 0;
}

---------------------------------------------------------------------

It's called in main() with "initgame(screen)". If I use these funtion the
screen stays black, no bmp is drawed. If I don't us the function and do
write the orders in the function directly to main() the bmp is drawed. I
can't say why.

By the way do you know a good debugger for windows?






More information about the SDL mailing list