src/joystick/haiku/SDL_haikujoystick.cc
changeset 10187 1f0f8c95531d
parent 9998 f67cf37e9cd4
equal deleted inserted replaced
10186:6c8e53149f0c 10187:1f0f8c95531d
    72         {
    72         {
    73             if (joystick.GetDeviceName(i, name) == B_OK) {
    73             if (joystick.GetDeviceName(i, name) == B_OK) {
    74                 if (joystick.Open(name) != B_ERROR) {
    74                 if (joystick.Open(name) != B_ERROR) {
    75                     BString stick_name;
    75                     BString stick_name;
    76                       joystick.GetControllerName(&stick_name);
    76                       joystick.GetControllerName(&stick_name);
    77                       SDL_joyport[SDL_SYS_numjoysticks] = strdup(name);
    77                       SDL_joyport[SDL_SYS_numjoysticks] = SDL_strdup(name);
    78                       SDL_joyname[SDL_SYS_numjoysticks] = strdup(stick_name.String());
    78                       SDL_joyname[SDL_SYS_numjoysticks] = SDL_strdup(stick_name.String());
    79                       SDL_SYS_numjoysticks++;
    79                       SDL_SYS_numjoysticks++;
    80                       joystick.Close();
    80                       joystick.Close();
    81                 }
    81                 }
    82             }
    82             }
    83         }
    83         }