test/testpalette.c
changeset 1516 4d241ea8a1cd
parent 1429 aff0170f9f1b
child 1659 14717b52abc0
     1.1 --- a/test/testpalette.c	Mon Mar 13 04:35:59 2006 +0000
     1.2 +++ b/test/testpalette.c	Mon Mar 13 05:36:42 2006 +0000
     1.3 @@ -167,7 +167,7 @@
     1.4      }
     1.5  
     1.6      /* Ask explicitly for 8bpp and a hardware palette */
     1.7 -    if(!(screen = SDL_SetVideoMode(SCRW, SCRH, 8, vidflags | SDL_HWPALETTE))) {
     1.8 +    if((screen = SDL_SetVideoMode(SCRW, SCRH, 8, vidflags | SDL_HWPALETTE)) == NULL) {
     1.9  	fprintf(stderr, "error setting %dx%d 8bpp indexed mode: %s\n",
    1.10  		SCRW, SCRH, SDL_GetError());
    1.11  	quit(1);
    1.12 @@ -175,7 +175,7 @@
    1.13  
    1.14      if (vidflags & SDL_FULLSCREEN) SDL_ShowCursor (SDL_FALSE);
    1.15  
    1.16 -    if(!(boat[0] = SDL_LoadBMP("sail.bmp")))
    1.17 +    if((boat[0] = SDL_LoadBMP("sail.bmp")) == NULL)
    1.18  	sdlerr("loading sail.bmp");
    1.19      /* We've chosen magenta (#ff00ff) as colour key for the boat */
    1.20      SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL,