[SDL] BMP is not drawed

Xosé Otero Ferreira xoseotero at yahoo.es
Wed Sep 7 23:54:30 PDT 2005


O Thursday 08 September 2005 07:55, vostede escribiu:
> /* Diese Funktion initalisiert SDL und setzte den Videomodus. */
> int initgame(SDL_Surface *target) {

Try to change target type to a pointer to a pointer:
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);

   *target = SDL_SetVideoMode(640, 480, 0, 0);

>    if (!target) {

   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;
> }

-- 
La patria es dicha, dolor y cielo de todos y no feudo ni capellanía de
nadie.
		-- José Martí. 

-- 
I'd never join any club that would have the likes of me as a member.
		-- Groucho Marx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050908/f30279a3/attachment-0008.pgp>


More information about the SDL mailing list