mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
Removed global variable from test program.
This commit is contained in:
parent
2540214e06
commit
65c82148e0
@ -20,19 +20,19 @@
|
|||||||
|
|
||||||
|
|
||||||
static SDLTest_CommonState *state;
|
static SDLTest_CommonState *state;
|
||||||
static SDL_Rect rect;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DrawRects(SDL_Renderer * renderer)
|
DrawRects(SDL_Renderer * renderer, SDL_Rect * rect)
|
||||||
{
|
{
|
||||||
SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255);
|
SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255);
|
||||||
SDL_RenderFillRect(renderer,&rect);
|
SDL_RenderFillRect(renderer, rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i, done;
|
int i, done;
|
||||||
|
SDL_Rect rect;
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
||||||
/* Enable standard application logging */
|
/* Enable standard application logging */
|
||||||
@ -43,7 +43,7 @@ main(int argc, char *argv[])
|
|||||||
if (!state) {
|
if (!state) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
for (i = 1; i < argc;i++) {
|
for (i = 1; i < argc; ++i) {
|
||||||
SDLTest_CommonArg(state, i);
|
SDLTest_CommonArg(state, i);
|
||||||
}
|
}
|
||||||
if (!SDLTest_CommonInit(state)) {
|
if (!SDLTest_CommonInit(state)) {
|
||||||
@ -89,7 +89,7 @@ main(int argc, char *argv[])
|
|||||||
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
|
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
|
|
||||||
DrawRects(renderer);
|
DrawRects(renderer, &rect);
|
||||||
|
|
||||||
SDL_RenderPresent(renderer);
|
SDL_RenderPresent(renderer);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user