testmouse.c: fixed -Wshadow warnings.

This commit is contained in:
Ozkan Sezer 2021-11-23 14:01:10 +03:00
parent 381f99a3fd
commit 370b8318af
1 changed files with 6 additions and 4 deletions

View File

@ -27,7 +27,6 @@
#endif #endif
static SDL_Window *window; static SDL_Window *window;
static SDL_Renderer *renderer;
typedef struct _Line { typedef struct _Line {
struct _Line *next; struct _Line *next;
@ -74,8 +73,9 @@ AppendLine(Line *line)
} }
void void
loop(void) loop(void *arg)
{ {
SDL_Renderer *renderer = (SDL_Renderer *)arg;
SDL_Event event; SDL_Event event;
/* Check for events */ /* Check for events */
@ -146,6 +146,8 @@ loop(void)
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
SDL_Renderer *renderer;
/* Enable standard application logging */ /* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
@ -173,10 +175,10 @@ main(int argc, char *argv[])
/* Main render loop */ /* Main render loop */
#ifdef __EMSCRIPTEN__ #ifdef __EMSCRIPTEN__
emscripten_set_main_loop(loop, 0, 1); emscripten_set_main_loop_arg(loop, renderer, 0, 1);
#else #else
while (!done) { while (!done) {
loop(); loop(renderer);
} }
#endif #endif