changeset 1632:870ce42b74d3

package sdl_image: show image on screen in test program
author Tony Theodore <tonyt@logyst.com>
date Sun, 06 Mar 2011 17:21:40 +1100
parents 9a86031b8ee0
children 99be6a1daee1
files src/sdl_image-test.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }