# HG changeset patch # User Tony Theodore # Date 1299392500 -39600 # Node ID 870ce42b74d372faa3b4eee92a8e9f2e874361dc # Parent 9a86031b8ee02f653ab62ad7b1376dc7faa82415 package sdl_image: show image on screen in test program diff -r 9a86031b8ee0 -r 870ce42b74d3 src/sdl_image-test.c --- a/src/sdl_image-test.c Sun Mar 06 17:20:30 2011 +1100 +++ b/src/sdl_image-test.c Sun Mar 06 17:21:40 2011 +1100 @@ -17,6 +17,9 @@ 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; }