machine/usb/hid/joystick: handle case where we cannot find the correct HID descriptor

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2023-04-17 14:38:15 +02:00
committed by Ron Evans
parent 2ab7ee6a8a
commit 25b03414dc
3 changed files with 23 additions and 5 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ func UseSettings(def Definitions, rxHandlerFunc func(b []byte), setupFunc func(s
State: def.NewState(),
}
if setupFunc == nil {
setupFunc = js.setupFunc
setupFunc = hid.DefaultSetupHandler
}
machine.EnableJoystick(js.handler, rxHandlerFunc, setupFunc, hidDesc)
Joystick = js