From 12098369fe85fa8b49e893ca4cf018ce155bd997 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 4 Feb 2011 21:46:38 -0800 Subject: [PATCH] Allow resizing of testsprite --- test/testsprite.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/testsprite.c b/test/testsprite.c index f9008fd79..7dafc154f 100644 --- a/test/testsprite.c +++ b/test/testsprite.c @@ -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; @@ -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;