[SDL] BMP is not drawed

sebastian at barfoot.mine.nu sebastian at barfoot.mine.nu
Wed Sep 7 22:55:00 PDT 2005

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",

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

   /* Netzwerkunterstützung aktivieren */
   if(SDLNet_Init() < 0) {
      fprintf(stderr, "Konnte Netzwerk nicht initialisieren: %s\n",
   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