mirror of
https://github.com/yawut/SDL.git
synced 2026-04-11 11:35:57 -05:00
Corrected device instance value for Linux joysticks.
This commit is contained in:
parent
7d4908e1d0
commit
d1e25656a3
|
|
@ -722,7 +722,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index)
|
|||
return -1;
|
||||
}
|
||||
|
||||
joystick->instance_id = device_index;
|
||||
joystick->instance_id = item->device_instance;
|
||||
joystick->hwdata = (struct joystick_hwdata *)
|
||||
SDL_malloc(sizeof(*joystick->hwdata));
|
||||
if (joystick->hwdata == NULL) {
|
||||
|
|
@ -732,7 +732,6 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index)
|
|||
}
|
||||
SDL_memset(joystick->hwdata, 0, sizeof(*joystick->hwdata));
|
||||
joystick->hwdata->removed = SDL_FALSE;
|
||||
joystick->hwdata->device_instance = item->device_instance;
|
||||
joystick->hwdata->guid = item->guid;
|
||||
joystick->hwdata->fd = fd;
|
||||
joystick->hwdata->fname = SDL_strdup(item->path);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
struct joystick_hwdata
|
||||
{
|
||||
int fd;
|
||||
int device_instance;
|
||||
SDL_bool removed;
|
||||
|
||||
SDL_JoystickGUID guid;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user