Removed global variable from test program.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 19 Apr 2014 15:28:13 +0200
changeset 87249fa8abe556d7
parent 8723 cfc134c9c369
child 8725 decbe9ca2d29
Removed global variable from test program.
test/testrelative.c
     1.1 --- a/test/testrelative.c	Sat Apr 19 00:31:02 2014 -0700
     1.2 +++ b/test/testrelative.c	Sat Apr 19 15:28:13 2014 +0200
     1.3 @@ -20,22 +20,22 @@
     1.4  
     1.5  
     1.6  static SDLTest_CommonState *state;
     1.7 -static SDL_Rect rect;
     1.8  
     1.9  static void
    1.10 -DrawRects(SDL_Renderer * renderer)
    1.11 +DrawRects(SDL_Renderer * renderer, SDL_Rect * rect)
    1.12  {
    1.13      SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255);
    1.14 -    SDL_RenderFillRect(renderer,&rect);
    1.15 +    SDL_RenderFillRect(renderer, rect);
    1.16  }
    1.17  
    1.18  int
    1.19  main(int argc, char *argv[])
    1.20  {
    1.21      int i, done;
    1.22 +    SDL_Rect rect;
    1.23      SDL_Event event;
    1.24  
    1.25 -	/* Enable standard application logging */
    1.26 +    /* Enable standard application logging */
    1.27      SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
    1.28  
    1.29      /* Initialize test framework */
    1.30 @@ -43,7 +43,7 @@
    1.31      if (!state) {
    1.32          return 1;
    1.33      }
    1.34 -    for (i = 1; i < argc;i++) {
    1.35 +    for (i = 1; i < argc; ++i) {
    1.36          SDLTest_CommonArg(state, i);
    1.37      }
    1.38      if (!SDLTest_CommonInit(state)) {
    1.39 @@ -89,7 +89,7 @@
    1.40              SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
    1.41              SDL_RenderClear(renderer);
    1.42  
    1.43 -            DrawRects(renderer);
    1.44 +            DrawRects(renderer, &rect);
    1.45  
    1.46              SDL_RenderPresent(renderer);
    1.47          }