Dean Ellis
69e2f36725
Removed NO_SYSDRAWING in favour of just MINUMAL
...
Reverted changes to GLControl.cs
Updated sln to not build OpenTK.GLControl in MINIMAL mode
2015-08-12 11:56:12 +01:00
Dean Ellis
c7e86d467b
Fixed MINIMAL and NO_SYSDRAWING compilation
2015-08-12 11:53:20 +01:00
thefiddler
2df0496c44
[SDL] Correctly byteswap Guid
...
Fixes an issue where GamePad Guids would fail to be matched with the
Guids in the configuration database.
2014-09-12 08:43:20 +02:00
thefiddler
5444c0c8b8
[SDL] Workaround for a Mono crash in SDL.JoystickGetGUID
...
It appears that Mono 3.4.0 fails to marshal SDL_JoystickGUID
correctly when used as a return value. Changing the fixed buffer
to a couple of long fields allows the struct to be marshalled
correctly.
2014-08-09 21:17:49 +02:00
thefiddler
e243316e8e
[Input] Cleaned up line endings and joystick hat mapping
2014-07-29 23:21:37 +02:00
Andrew O'Connor
fe1d465b85
[Input][SDL] Fix JoystickHat bugs
...
On SDL, DPad inputs were not correctly translated from joystick
hat inputs.
Updated MappedGamePadDriver so that it will correctly recognize
combined joystick hat directions e.g. DPadLeft should be true when
DownLeft, Left, or UpLeft are returned from the joystick hat.
2014-07-27 14:54:36 +01:00
thefiddler
e81d8da068
[OpenTK] Reduce duplication in GraphicsContextBase
...
Inheritors now take advantage of base class functionality to avoid
duplicating finalizers and warning messages.
2014-07-23 10:08:57 +02:00
thefiddler
00b531fdef
Fixed compilation warnings on Mono 3.4.0
2014-07-21 17:46:39 +02:00
thefiddler
e0a3b73130
Cleaned up the remaining obsolete warnings
2014-07-21 16:49:24 +02:00
thefiddler
ead151ea4f
Fixed a large number of warnings
2014-07-21 16:03:37 +02:00
Goz3rr
399e08ee33
Changed TranslateFlags to actually translate flags instead of using switch
2014-05-15 11:52:55 +02:00
Goz3rr
4414886832
Added GameWindowFlags.FixedWindow to allow for fixed border SDL Windows
2014-05-15 00:38:06 +02:00
thefiddler
c0b0990687
[OpenTK] Do not crash when no monitor connected
...
NativeWindow now checks for a non-null device before attempting to
access its properties. Affects
https://github.com/mono/MonoGame/issues/2416
2014-05-12 16:27:39 +02:00
thefiddler
7eefb3e3ff
[SDL] Use h-wheel events
2014-05-12 02:20:52 +02:00
thefiddler
bb8dfe4304
[Input] Improve SDL2 and Windows GetCursorState
2014-05-12 02:20:52 +02:00
thefiddler
f4a3cab0e0
[Input] Added Mouse.GetCursorPos() (WIP)
2014-05-12 02:20:52 +02:00
thefiddler
cd7342b688
Merge pull request #114 from thefiddler/nativewindow
...
INativeWindow cleanup and consolidation
2014-05-12 02:20:29 +02:00
thefiddler
d7e0373852
[Platform] Fixed keys getting stuck on focus loss
...
NativeWindowBase will now clear all keyboard keys when losing focus.
This prevents keys from getting stuck when refocusing the window.
[Win] Also fixed WindowState.Maximized when WindowBorder is Hidden and
the window is minimized.
2014-05-09 16:45:45 +02:00
thefiddler
e3fd9e1374
[SDL] Avoid CursorVisible = true cursor jump
2014-05-06 09:36:30 +02:00
thefiddler
a270b9328e
[SDL] Report mouse in client coordinates
2014-05-06 09:31:35 +02:00
thefiddler
52efa3b629
[SDL] Improved documentation of Event size hack
2014-05-05 15:11:01 +02:00
Stefanos A
dffabcb94a
[SDL] Fixed a stack corruption issue on win32
2014-05-05 12:46:48 +02:00
thefiddler
8b7d5bc7e4
[Input] Implement key repeat
2014-05-05 00:43:45 +02:00
thefiddler
d968281a1b
[OpenTK] Refactor keyboard and mouse handling
...
A lot of duplicated code is now moved to NativeWindowBase and
LegacyInputDriver.
2014-05-04 17:05:08 +02:00
thefiddler
94fdf1881c
[Platform] Improved mouse interface
...
- The complete mouse state is now available in mouse events
- Horizontal wheels are now supported
- MouseState now takes up less memory and has a simpler internal
implementation.
2014-05-04 01:29:55 +02:00
thefiddler
e85377c350
[Platform] Added support for horizontal wheel
2014-05-03 16:47:03 +02:00
thefiddler
842c0499b9
[SDL] Corrected SDL_Mouse* event structs
2014-05-02 17:39:00 +02:00
thefiddler
3e33ac9280
[Platform] Refactored INativeWindow backends
...
All INativeWindow implementations are now derived from
NativeWindowBase. They no longer implement legacy IInputDriver
themselves, but rather rely on LegacyInputDriver provided by
NativeWindowBase for compatibility. They also implement the new Mouse*
events.
2014-05-02 16:52:11 +02:00
thefiddler
612652910f
[Platform] Inherit NativeWindowBase
2014-05-02 14:18:40 +02:00
thefiddler
9988a2ba9c
[SDL][Win] Destroy custom cursor on Close()
...
X11 destroys the cursor after setting it and Cocoa uses an autorelease
pool, so that should not be necessary there.
2014-05-01 14:27:20 +02:00
thefiddler
c8c0d32fcc
[OpenTK] Rearranged MouseCursor parameters
...
MouseCursor and WindowIcon now match GL.TexImage2D in the way they
arrange their parameters. The expected values of each parameter are now
documented.
2014-04-30 20:04:31 +02:00
thefiddler
8568e6dc70
[SDL] Fixed MouseCursor getting stuck after multiple changes
2014-04-30 13:46:44 +02:00
thefiddler
a5ddc530c2
[SDL] Fixed custom MouseCursor
2014-04-30 13:36:16 +02:00
thefiddler
890805f2ae
[Platform] Renamed MouseCursor.Rgba to Argb
...
This matches the default format of System.Drawing.Bitmap.
2014-04-30 08:38:57 +02:00
thefiddler
d787656328
[SDL] Fixed cursor support
...
SDL.CreateColorCursor takes 3 arguments, not 5.
2014-04-27 21:09:51 +02:00
thefiddler
dd55cea489
[All] Initial implementation of INativeWindow.Cursor property
...
Affects issue #9
2014-04-27 10:52:53 +02:00
thefiddler
f545bd512b
[SDL2] Implemented cursor APIs
...
Affects issue #9
2014-04-27 10:52:53 +02:00
thefiddler
433fa35f7e
[Graphics] GetAddress(string) is no longer needed
2014-04-26 14:20:17 +02:00
thefiddler
03a8a6da0e
[SDL2] Optimized Sdl2KeyCode translation
...
Also fixed Key.WinLeft, WinRight and Menu translation.
2014-04-25 12:14:27 +02:00
thefiddler
f23b93b839
[SDL2] On Mac, OpenGL 3.0 or 3.1 should create 3.2 context
...
SDL2/Mac fails to create a 3.0 or 3.1 OpenGL context. We implicitly
bump version to 3.2, otherwise 3.0 or 3.1 would give a 2.1 context.
2014-03-16 22:50:12 +01:00
thefiddler
09f9bb3a17
[SDL2] Implemented modifier keys
...
Additionally, removed event watch callback in favor of calling
PollEvent() directly in ProcessEvents, which should be more efficient.
2014-02-25 01:13:45 +01:00
thefiddler
0c262cd5b2
[SDL2] Added PeepEvents/PollEvent functions
2014-02-25 01:13:45 +01:00
thefiddler
14d53010b0
[SDL2] Corrected win/alt key mapping (was swapped previously)
2014-02-25 01:13:45 +01:00
thefiddler
a7228274aa
[Input] Added JoystickCapabilities.HatCount
2014-01-31 15:40:07 +01:00
thefiddler
168c45f0e2
[SDL2] Implemented support for hat state
2014-01-31 15:03:51 +01:00
thefiddler
417a6bedc1
[SDL2] Use RelaxGraphicsMode to find optimal mode
...
For SDL2, RelaxGraphicsMode requires us to clear context attributes
between consecutive attempts. This is implemented by calling
ClearGLAttributes().
2014-01-22 11:37:37 +01:00
Stefanos A
f3036e5f10
Merge branch 'develop' into linux_joystick
2014-01-14 18:26:05 +01:00
Stefanos A.
aff9719872
[SDL2] Implemented GetWindowWMInfo
2014-01-10 16:55:20 +01:00
thefiddler
a4d2a31386
[Mac] OpenGL 3.x/4.x require core profile flag
...
SDL will fail to construct an OpenGL 3.x/4.x context on Mac OS X,
unless ContextProfileFlags.CORE is specified.
Fixes issue #44
Upstream enhancement request at
https://bugzilla.libsdl.org/show_bug.cgi?id=2342
2014-01-09 23:36:28 +01:00
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