Hi,

after a cygwin update, SDL2 does not recognize my gamepads any more.
They definitely worked before:
      libSDL2_2.0_0-2.0.7-1.tar.xz   <- joystick worked fine     (2021-10-09)
      libSDL2_2.0_0-2.28.3-2.tar.xz  <- SDL_NumJoysticks() is 0  (2023-09-30)

Example:
//  $ gcc -o testjoystick testjoystick.cc $(pkg-config --cflags --libs SDL2)
#include <SDL.h>
#include <stdio.h>

int main(int argc, char *argv[]) {
    if (!SDL_WasInit(SDL_INIT_JOYSTICK)) {
        int res = SDL_Init(SDL_INIT_JOYSTICK);
        if (res < 0)
            printf("SDL init joystick failed: %s\n", SDL_GetError());
    }
    int num_joysticks = SDL_NumJoysticks();
    printf("SDL_NumJoysticks()=%d\n", num_joysticks);

    return 0;
}


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to