thefiddler
9c8a5f5028
[SDL2] Fixed GameControllerButton to Buttons translation
2013-12-30 17:15:49 +01:00
thefiddler
43ef78f222
[SDL2] Fix issue where changes to mutable struct were lost
2013-12-30 17:09:20 +01:00
thefiddler
9beb396c9e
[SDL2] Explicitly enable joystick and gamepad events
2013-12-30 17:08:42 +01:00
thefiddler
2d303a6884
[Input] Buttons should have [Flags] attribute
2013-12-30 16:07:06 +01:00
Stefanos A.
6faa58aac3
[SDL2] Fixed joystick hotplugging
...
SDL2 uses a weird system of device ids and instance ids to report
joystick events, where the ADDED event uses a device id and the rest use
instance ids.
The SDL2 joystick driver is now fixed to correctly distinguish between
the two, which fixes hotplugging support for joystick devices.
2013-12-30 15:24:48 +01:00
thefiddler
52b8762593
[SDL2] Fixed mapping of instance ids to device ids
2013-12-30 14:57:28 +01:00
thefiddler
a4366e52f5
[Input] Added missing closing brace in ToString() message
2013-12-30 14:56:22 +01:00
thefiddler
064a45e4a7
[Input] Fixed incorrect variable name
2013-12-30 13:49:26 +01:00
thefiddler
1b0a72472e
[SDL] Use TranslateAxis() to decode ControllerAxisEvent
...
SDL GameControllerAxis and GamePadAxes are not interchangeable. The
driver will now correctly interpret incoming SDL messages and update
the GamePadState for the relevant axis.
2013-12-30 13:42:37 +01:00
thefiddler
e997ddf9c6
[Input] Fixed GamePadState.SetAxis() implementation
...
GamePadState.SetAxis() receives a GamePadAxes enumeration, which is a
bitmask of the axes we wish to set. SetAxis now correctly decodes the
bitmask to apply the values we are interested in.
2013-12-30 13:39:43 +01:00
thefiddler
f7fbf38c43
IsButtonBind should check for buttons, not axes
2013-12-25 01:47:27 +01:00
thefiddler
b4b8bc1665
Implemented SDL IJoystickDriver2 and IGamePadDriver
2013-12-24 19:15:23 +01:00
thefiddler
c51c4934df
Added GameControllerGetBind APIs
2013-12-24 19:14:54 +01:00
thefiddler
6fc679c4ba
Removed duplicate button types
2013-12-24 19:14:35 +01:00
thefiddler
016b91142b
Merge branch 'gamepad' of https://github.com/opentk/opentk into gamepad
2013-12-24 17:18:20 +01:00
thefiddler
1eb807bb64
Use IGamePadDriver through MappedGamePadDriver
2013-12-24 17:18:05 +01:00
Stefanos A
7fd7b8c7a2
Improved ToString implementation
2013-12-24 17:18:05 +01:00
Stefanos A
9a90772cef
Fixed WinMM offsets for IJoystickDevice2
2013-12-24 17:18:05 +01:00
Stefanos A
f3cb578587
Improved WinMMJoystickDriver hotplugging behavior
2013-12-24 17:18:05 +01:00
Stefanos A
d33d0c7387
Added state output for OpenTK.Input.Joystick
2013-12-24 17:18:05 +01:00
Stefanos A
82a2c9113c
Implemented structural equality
2013-12-24 17:18:04 +01:00
Stefanos A
890d56ae63
Connected XInput driver
2013-12-24 17:18:04 +01:00
Stefanos A
15c01d0d5c
WinMMJoystick implements IJoystickDriver2
...
WinMM is optimized for general joystick use, not for the canonical
GamePad layout. Instead of exposing IGamePadDriver directly, it should
expose IJoystickDriver2 and use a mapping driver to get GamePad support.
2013-12-24 17:18:04 +01:00
Stefanos A
165aa5bde6
Added MappedGamePadDriver skeleton implementation
2013-12-24 17:18:04 +01:00
Stefanos A
02fb6bf2f9
Implements JoystickState and Capabilities setters
2013-12-24 17:18:04 +01:00
Stefanos A
91b54cfbf3
No reason to comment out #region License
2013-12-24 17:18:04 +01:00
Stefanos A
52daef4b0d
Added internal GamePadMapping class
2013-12-24 17:18:04 +01:00
Stefanos A
2839db587e
Implemented thumbsticks and trigger caps
2013-12-24 17:18:04 +01:00
Stefanos A
7e5307bd4a
Added IJoystickDevice2 interface
2013-12-24 17:18:03 +01:00
Stefanos A
e2d86fdf52
Implemented initial XInput IGamePadDriver
2013-12-24 17:18:03 +01:00
Stefanos A
b62f5993d4
Added missing left/right triggers
2013-12-24 17:18:03 +01:00
Stefanos A
f459647613
Removed all instances of refresh_text
2013-12-24 17:18:03 +01:00
Stefanos A
ddc52ce135
Implemented GamePad Capabilities and Type
2013-12-24 17:18:03 +01:00
Stefanos A
ea3c9ffe85
Refresh text continuously
2013-12-24 17:18:03 +01:00
Stefanos A
dd648a8362
Initial implementation of GamePadTriggers
2013-12-24 17:18:03 +01:00
thefiddler
8f7eebb58d
Enabled HIDInput IGamePadDriver implementation
2013-12-24 17:18:02 +01:00
Stefanos A
5d88a8daf4
Implemented GamePad API (WIP)
2013-12-24 17:18:02 +01:00
Stefanos A
0875cbd928
Removed unnecessary IsButtonValid method
2013-12-24 17:18:02 +01:00
Stefanos A
1adc3f7733
Display start button in ToString()
2013-12-24 17:18:02 +01:00
Stefanos A
0c9a67da41
Fixed rendering of joysticks and gamepads
...
Joysticks and gamepad states would overlap, causing some lines to be
unreadable. This is now fixed.
2013-12-24 17:18:02 +01:00
Stefanos A
44351a03c4
More robust handling of device add/remove events
2013-12-24 17:18:02 +01:00
Stefanos A
31ce400a7e
Fixed expansion of joysticks collection
2013-12-24 17:18:02 +01:00
Stefanos A
2f1a81da2c
Log errors in subsystem initialization
2013-12-24 17:18:02 +01:00
Stefanos A
1d61bd9dd2
Reuse Sdl2Factory.InputDriver in Sdl2NativeWindow
2013-12-24 17:18:01 +01:00
Stefanos A
a72d70c3d0
Delay joystick initialization until necessary
2013-12-24 17:18:01 +01:00
Stefanos A
3660509dee
Added SDL_InitSubSystem method
2013-12-24 17:18:01 +01:00
Stefanos A
4a13415fc6
Fixed x/y axis mixup.
2013-12-24 17:18:01 +01:00
Stefanos A
1ba5fd4380
Cleaned up using directives
2013-12-24 17:18:01 +01:00
Stefanos A
76a35c0b91
Added missing newline
2013-12-24 17:18:01 +01:00
Stefanos A
91d248ad29
Implemented GamePadThumbSticks
2013-12-24 17:18:01 +01:00