mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-04 22:59:49 +00:00
SDL_GetJoysticks() follows the SDL_GetStringRule
This commit is contained in:
@@ -1187,7 +1187,7 @@ static void OpenVirtualGamepad(void)
|
||||
static void CloseVirtualGamepad(void)
|
||||
{
|
||||
int i;
|
||||
SDL_JoystickID *joysticks = SDL_GetJoysticks(NULL);
|
||||
const SDL_JoystickID *joysticks = SDL_GetJoysticks(NULL);
|
||||
if (joysticks) {
|
||||
for (i = 0; joysticks[i]; ++i) {
|
||||
SDL_JoystickID instance_id = joysticks[i];
|
||||
@@ -1195,7 +1195,6 @@ static void CloseVirtualGamepad(void)
|
||||
SDL_DetachVirtualJoystick(instance_id);
|
||||
}
|
||||
}
|
||||
SDL_free(joysticks);
|
||||
}
|
||||
|
||||
if (virtual_joystick) {
|
||||
|
||||
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
|
||||
SDL_free(SDL_GetMice(&num_mice));
|
||||
SDL_Log("There are %d mice at startup\n", num_mice);
|
||||
|
||||
SDL_free(SDL_GetJoysticks(&num_joysticks));
|
||||
SDL_GetJoysticks(&num_joysticks);
|
||||
SDL_Log("There are %d joysticks at startup\n", num_joysticks);
|
||||
|
||||
if (enable_haptic) {
|
||||
|
||||
Reference in New Issue
Block a user