-
Notifications
You must be signed in to change notification settings - Fork 7
Description
struct _GLFWjoystickにchar serialNumbe[255]フィールドを追加
https://github.com/glfw/glfw/blob/e0f7ce402b46f5ef4c1cc422413056b8a83fb6df/src/internal.h#L487
して、
_glfwAllocJoystickにserialNumberを追加
https://github.com/glfw/glfw/blob/0cc13ceafc233cb0bc95c8b3ff8152ee75893bf9/src/input.c#L429
各プラットフォーム毎に処理を書く
cocoa
kIOHIDSerialNumberKey をつかって、
https://developer.apple.com/documentation/iokit/kiohidserialnumberkey
https://gist.github.com/scottmac/1221426
ここで渡す
https://github.com/glfw/glfw/blob/e0f7ce402b46f5ef4c1cc422413056b8a83fb6df/src/cocoa_joystick.m#L273
win
やり方がわからない
ここで渡す
https://github.com/glfw/glfw/blob/master/src/win32_joystick.c#L469
https://github.com/glfw/glfw/blob/master/src/win32_joystick.c#L529
linux
これでできる?
https://stackoverflow.com/questions/2432759/usb-drive-serial-number-under-linux-c
ここで渡す
https://github.com/glfw/glfw/blob/e0f7ce402b46f5ef4c1cc422413056b8a83fb6df/src/linux_joystick.c#L225