thefiddler
94c3c24bfb
[OpenTK] Platform backends should inherit from PlatformFactoryBase
...
This reduces code duplication wrt deprecated interfaces and common
support code between backends.
2014-01-06 14:49:05 +01:00
thefiddler
3a63496b6d
Merge branch 'gamepad' into develop
...
Conflicts:
Source/OpenTK/OpenTK.csproj
2014-01-03 02:23:02 +01:00
thefiddler
53552b0070
[Input] Corrected malformed documentation comments
2014-01-03 02:17:42 +01:00
thefiddler
8649e4a044
[Input] Added SetVibration() API skeleton
2014-01-02 19:52:00 +01:00
thefiddler
b513e35ea8
[SDL2] Implemented PacketNumber property
2014-01-02 19:24:38 +01:00
thefiddler
9e4827bf67
[SDL2] Fixed SDL_JoystickGetGUID capitalization
2014-01-02 02:20:51 +01:00
thefiddler
b9a8e365de
[Input] Added IJoystickDriver2.GetGuid() API
2013-12-31 14:09:17 +01:00
thefiddler
cd143af60a
[SDL2] Added JoystickGetGUID method
2013-12-31 14:08:28 +01:00
thefiddler
1687518ef5
[SDL2] Add compile-time check for SDL2 GameController vs MappedGamePadDriver
2013-12-31 11:46:40 +01:00
thefiddler
d4348c5083
[SDL2] Fixed joystick/controller hotplugging support
2013-12-30 17:22:45 +01:00
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
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
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
9171977079
[SDL2] Added missing [SuppressUnamangedCodeSecurity] attribute
2013-12-28 01:04:46 +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
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
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
thefiddler
484af18673
Updated internal IGamePadDriver interface
2013-12-24 17:18:00 +01:00
thefiddler
ee65f81f56
Implemented GameController API bindings
2013-12-24 17:18:00 +01:00
thefiddler
d9985fc571
Use SDL2 event API for joystick devices
2013-12-24 17:18:00 +01:00
thefiddler
022e5c845c
Implemented SDL2 Joystick and GameController events
2013-12-24 17:17:59 +01:00
Stefanos A.
498f16c2bd
Improved diagnostics
...
This helps when tracking down GraphicsContext-related issues in SDL2.
2013-12-16 10:39:54 +01:00
Stefanos A.
6ad91dcc5b
Added hack for MonoGame compatibility
...
MonoGame uses reflection to access internal APIs. We need to keep these
available until this is fixed downstream.
2013-12-16 10:39:11 +01:00
Stefanos A.
1392d48ec0
Protect against recursion in Closing event
...
Misbehaving clients that shall not be named here may call
GameWindow.Close() inside the GameWindow.Closing event. This causes
recursion in SDL2, crashing the application.
This patch adds a guard to protect against recursion when calling
GameWindow.Close().
2013-12-16 10:37:59 +01:00
Stefanos A
e9f54dc61e
Fixed memory corruption on string return type marshaling
2013-12-15 20:57:25 +01:00
Stefanos A
dfd683ef49
Merge master into no-reflect
2013-12-15 16:36:37 +01:00
Stefanos A
0bdb871e90
Merge remote-tracking branch 'origin/master' into no-reflect
2013-12-05 14:53:37 +01:00
Stefanos A.
1475b3d427
Made DPI-awareness configurable (issue #6 )
...
It is now possible to indicate that an application is not DPI-aware. In
that case, OpenTK will let the operating system handle DPI scaling. This
results in worse visuals (pixel doubling) but allows non DPI-aware
applications to continue working.
2013-12-02 22:18:16 +01:00
Stefanos A.
c53c0bc66f
Added GetProcAddress(IntPtr) overloads
...
This might allow us to improve startup performance, by avoiding string
marshaling during extension loading.
2013-11-28 23:21:19 +01:00
Elias Holzer
6ee04b2ff9
Implemented KeyPress event for Sdl2NativeWindow.
2013-11-22 18:05:11 +01:00
Elias Holzer
f851d8887c
Implemented KeyDown and KeyUp events for Sdl2NativeWindow.
2013-11-22 18:04:53 +01:00
Stefanos A.
08701d318c
Destroy SDL window when finalized
...
SDL_DestroyWindow must be called on the main thread. If the window is
finalized, the finalizer will push a CLOSE event to the event loop
(thread-safe) and the window will be destroyed on the main thread.
2013-11-21 09:31:32 +01:00
Stefanos A.
75d4f3d07c
Fixed #5
...
We need to release the cursor before closing a GameWindow, otherwise
subsequent GameWindows may fail to receive mouse events.
2013-11-20 18:05:45 +01:00
Stefanos A.
1d19a80b53
Removed incorrect comment
2013-11-20 13:05:49 +01:00
Stefanos A.
48803bb4d6
Fixed #4
...
Sdl2InputDriver.Dispose() would call SDL_DelEventWatch with a different
"user_data" parameter than SDL_AdEventWatch. This caused the EventFilter
to remain registered and subsequently crash when closing and reopening a
window.
2013-11-20 09:10:12 +01:00
Stefanos A.
32828ecd8a
Do not call SDL.GetVersion unless requested
2013-11-18 18:35:23 +01:00
parallels
7f921dae47
Merge branch 'master' of https://github.com/thefiddler/opentk into modes
2013-11-09 17:15:05 +01:00
parallels
da684d233e
Swallow DllNotFoundException in Sdl2 constructor
2013-11-09 17:13:24 +01:00
Stefanos A
0f01a6d128
Stronger check for ES support
...
It is not enough to check for EGL, we also need to check that
ContextProfileFlags.ES is set.
2013-11-09 15:07:18 +01:00