From 7badc38d2676e1c7df5011d1f8dc37ed5a56a4e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=B4=E9=80=B8?= <853974536@qq.com> Date: Sat, 12 Mar 2022 16:39:01 +0800 Subject: [PATCH] bug fixed. --- cpymo-backends/sdl2/cpymo_backend_input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpymo-backends/sdl2/cpymo_backend_input.c b/cpymo-backends/sdl2/cpymo_backend_input.c index 3ad9cca6..91669398 100644 --- a/cpymo-backends/sdl2/cpymo_backend_input.c +++ b/cpymo-backends/sdl2/cpymo_backend_input.c @@ -130,8 +130,8 @@ void cpymo_input_refresh_joysticks() if (gamecontrollers) { memset(gamecontrollers, 0, sizeof(gamecontrollers[0]) * gamecontrollers_count); size_t j = 0; - for (int i = 0; i < gamecontrollers_count; ++i) - if (SDL_IsGameController(i)) - gamecontrollers[j++] = SDL_GameControllerOpen(i); + for (size_t i = 0; i < gamecontrollers_count; ++i) + if (SDL_IsGameController((int)i)) + gamecontrollers[j++] = SDL_GameControllerOpen((int)i); } } \ No newline at end of file