test/testshape.c
changeset 11111 0841489fa4df
parent 11080 1677ac34c68c
child 11811 5d94cb6b24d3
     1.1 --- a/test/testshape.c	Wed Jun 21 01:22:00 2017 -0400
     1.2 +++ b/test/testshape.c	Sat Jun 24 23:45:19 2017 +0200
     1.3 @@ -154,7 +154,7 @@
     1.4      SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h);
     1.5      SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode);
     1.6      while(should_exit == 0) {
     1.7 -        if (SDL_PollEvent(&event)) {
     1.8 +        while (SDL_PollEvent(&event)) {
     1.9              if(event.type == SDL_KEYDOWN) {
    1.10                  button_down = 1;
    1.11                  if(event.key.keysym.sym == SDLK_ESCAPE) {
    1.12 @@ -172,8 +172,10 @@
    1.13                  SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h);
    1.14                  SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode);
    1.15              }
    1.16 -            if(event.type == SDL_QUIT)
    1.17 +            if (event.type == SDL_QUIT) {
    1.18                  should_exit = 1;
    1.19 +                break;
    1.20 +            }
    1.21          }
    1.22          render(renderer,pictures[current_picture].texture,texture_dimensions);
    1.23          SDL_Delay(10);