diff options
author | Tony Theodore <tonyt@logyst.com> | 2011-03-06 06:21:40 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2011-03-06 06:21:40 (GMT) |
commit | 3467773675478d8ae8918f99ff32ff3e99d89a8a (patch) | |
tree | b3b7934f1d179e39d957eec553621db1665b6996 | |
parent | 402a034f8a4324bda7287e8a60f77e6b68ce3774 (diff) | |
download | mxe-3467773675478d8ae8918f99ff32ff3e99d89a8a.zip mxe-3467773675478d8ae8918f99ff32ff3e99d89a8a.tar.gz mxe-3467773675478d8ae8918f99ff32ff3e99d89a8a.tar.bz2 |
package sdl_image: show image on screen in test program
-rw-r--r-- | src/sdl_image-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sdl_image-test.c b/src/sdl_image-test.c index d0fb402..59b9d44 100644 --- a/src/sdl_image-test.c +++ b/src/sdl_image-test.c @@ -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; } |