Skip to content

Commit

Permalink
Removed global variable from test program.
Browse files Browse the repository at this point in the history
  • Loading branch information
philippwiesemann committed Apr 19, 2014
1 parent 2540214 commit 65c8214
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/testrelative.c
Expand Up @@ -20,30 +20,30 @@


static SDLTest_CommonState *state;
static SDL_Rect rect;

static void
DrawRects(SDL_Renderer * renderer)
DrawRects(SDL_Renderer * renderer, SDL_Rect * rect)
{
SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255);
SDL_RenderFillRect(renderer,&rect);
SDL_RenderFillRect(renderer, rect);
}

int
main(int argc, char *argv[])
{
int i, done;
SDL_Rect rect;
SDL_Event event;

/* Enable standard application logging */
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);

/* Initialize test framework */
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
if (!state) {
return 1;
}
for (i = 1; i < argc;i++) {
for (i = 1; i < argc; ++i) {
SDLTest_CommonArg(state, i);
}
if (!SDLTest_CommonInit(state)) {
Expand Down Expand Up @@ -89,7 +89,7 @@ main(int argc, char *argv[])
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
SDL_RenderClear(renderer);

DrawRects(renderer);
DrawRects(renderer, &rect);

SDL_RenderPresent(renderer);
}
Expand Down

0 comments on commit 65c8214

Please sign in to comment.