Fixed freeing strings created by strdup() with SDL_free().
This only worked on platforms where SDL_free() wraps free().
This commit is contained in:
parent
71e7b716dc
commit
38b769cbe1
3 changed files with 8 additions and 8 deletions
|
@ -74,8 +74,8 @@ extern "C"
|
|||
if (joystick.Open(name) != B_ERROR) {
|
||||
BString stick_name;
|
||||
joystick.GetControllerName(&stick_name);
|
||||
SDL_joyport[SDL_SYS_numjoysticks] = strdup(name);
|
||||
SDL_joyname[SDL_SYS_numjoysticks] = strdup(stick_name.String());
|
||||
SDL_joyport[SDL_SYS_numjoysticks] = SDL_strdup(name);
|
||||
SDL_joyname[SDL_SYS_numjoysticks] = SDL_strdup(stick_name.String());
|
||||
SDL_SYS_numjoysticks++;
|
||||
joystick.Close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue