Skip to content

Commit 022e99d

Browse files
committed
linux build fix
1 parent 2f424a3 commit 022e99d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/system/sokol/sokol_gamepad.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2556,20 +2556,19 @@ _SOKOL_PRIVATE bool openJoystickDevice(const char* path)
25562556
}
25572557
}
25582558

2559-
_SOKOL_joystick* js =
2560-
_sokol_AllocJoystick(name, guid, axisCount, buttonCount, hatCount);
2561-
if (!js)
2559+
_SOKOL_joystick* joy = _sokol_AllocJoystick(name, guid, axisCount, buttonCount, hatCount);
2560+
if (!joy)
25622561
{
2563-
close(js.fd);
2562+
close(joy.fd);
25642563
return false;
25652564
}
25662565

2567-
strncpy(js.path, path, sizeof(js.path) - 1);
2568-
memcpy(&js->js, &js, sizeof(js));
2566+
strncpy(joy.path, path, sizeof(joy.path) - 1);
2567+
memcpy(&joy->js, &joy, sizeof(joy));
25692568

2570-
pollAbsState(js);
2569+
pollAbsState(joy);
25712570

2572-
_sokol_InputJoystick(js, SOKOL_CONNECTED);
2571+
_sokol_InputJoystick(joy, SOKOL_CONNECTED);
25732572
return true;
25742573
}
25752574

0 commit comments

Comments
 (0)