testmouse.c: fixed -Wshadow warnings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/test/testmouse.c b/test/testmouse.c
index facc74c..218a091 100644
--- a/test/testmouse.c
+++ b/test/testmouse.c
@@ -27,7 +27,6 @@
#endif
static SDL_Window *window;
-static SDL_Renderer *renderer;
typedef struct _Line {
struct _Line *next;
@@ -74,8 +73,9 @@ AppendLine(Line *line)
}
void
-loop(void)
+loop(void *arg)
{
+ SDL_Renderer *renderer = (SDL_Renderer *)arg;
SDL_Event event;
/* Check for events */
@@ -146,6 +146,8 @@ loop(void)
int
main(int argc, char *argv[])
{
+ SDL_Renderer *renderer;
+
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
@@ -173,10 +175,10 @@ main(int argc, char *argv[])
/* Main render loop */
#ifdef __EMSCRIPTEN__
- emscripten_set_main_loop(loop, 0, 1);
+ emscripten_set_main_loop_arg(loop, renderer, 0, 1);
#else
while (!done) {
- loop();
+ loop(renderer);
}
#endif