Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Allow resizing of testsprite
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 5, 2011
1 parent f1efafc commit 83da4fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/testsprite.c
Expand Up @@ -172,7 +172,7 @@ main(int argc, char *argv[])
}

numsprites = NUM_SPRITES;
videoflags = SDL_SWSURFACE | SDL_ANYFORMAT;
videoflags = SDL_SWSURFACE | SDL_ANYFORMAT | SDL_RESIZABLE;
width = 640;
height = 480;
video_bpp = 8;
Expand Down Expand Up @@ -297,6 +297,9 @@ main(int argc, char *argv[])
++frames;
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_VIDEORESIZE:
screen = SDL_SetVideoMode(event.resize.w, event.resize.h, video_bpp, videoflags);
break;
case SDL_MOUSEBUTTONDOWN:
SDL_WarpMouse(screen->w / 2, screen->h / 2);
break;
Expand Down

0 comments on commit 83da4fc

Please sign in to comment.