mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 18:30:21 +00:00
Fixed 'joystick' input.
This commit is contained in:
parent
5c23acdbaf
commit
e5fe37f089
@ -198,12 +198,12 @@ class MachineDocument:
|
||||
|
||||
func keyDown(_ event: NSEvent) {
|
||||
self.withKeyboardMachine { $0.setKey(event.keyCode, isPressed: true) }
|
||||
self.withJoystickMachine { sendJoystickEvent($0, keyCode: event.keyCode, isPressed: false) }
|
||||
self.withJoystickMachine { sendJoystickEvent($0, keyCode: event.keyCode, isPressed: true) }
|
||||
}
|
||||
|
||||
func keyUp(_ event: NSEvent) {
|
||||
self.withKeyboardMachine { $0.setKey(event.keyCode, isPressed: false) }
|
||||
self.withJoystickMachine { sendJoystickEvent($0, keyCode: event.keyCode, isPressed: true) }
|
||||
self.withJoystickMachine { sendJoystickEvent($0, keyCode: event.keyCode, isPressed: false) }
|
||||
}
|
||||
|
||||
func flagsChanged(_ newModifiers: NSEvent) {
|
||||
|
Loading…
Reference in New Issue
Block a user