package sdl_image: show image on screen in test program

This commit is contained in:
Tony Theodore 2011-03-06 17:21:40 +11:00
parent 402a034f8a
commit 3467773675
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,9 @@ int main(int argc, char *argv[])
image = IMG_Load("test.png");
screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE);
if (SDL_BlitSurface(image, NULL, screen, NULL) < 0) return 1;
SDL_UpdateRect(screen, 0, 0, image->w, image->h);
SDL_Delay(3000);
SDL_Quit();
return 0;
}