HIDInput.Dispose() would remove elements from a DeviceCollection during
iteration. This results in an exception.
We are now using a plain for-loop instead.
Joystick elements (axes, buttons, hats) are now reported in the same
order as SDL2. This fixes potential mismatches in the GamePad
configuration database.
Additionally, elements are now counted correctly (duplicate elements no
longer count towards the total.)
The stored delegate list would store delegates indefinitely, causing a
memory leak. It is now the responsibility of each class to maintain
references to any callback functions it defines.
Devices are now explicitly closed when they a DeviceRemoved event is
received. Additionally, exceptions are no longer allowed to escape into
unmanaged code, where they might crash the runtime.
Callbacks are now explicitly marked as unmanaged pointers with the
correct (platform-defined) calling convention. Exceptions raised inside
these callbacks are no longer allowed to escape into unmanaged code,
where they will crash the runtime.
Additionally, the window is now only closed on the UI thread, and only
if it is actually open.
CocoaNativeWindow now checks for and reports failures to allocate
resources in its constructor. Additionally, it no longer calls UI
methods in the finalizer thread, as those methods will crash on Cocoa.
Non-accelerated contexts are now considered iff no accelerated contexts
are available. Additionally, a GraphicsException will be thrown if
context construction fails for any reason, instead of causing a runtime
crash.
External mice will now report horizontal scrolling in the low-level
`Mouse.GetState()` API. The touchpad apparently creates an emulated
mouse device that does not report horizontal wheel scrolling events.
Touchpad support probably requires a proper multitouch implementation.
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.
On HiDPI displays, the client rectangle is using a pixel-based
coordinate system, while the screen is using a point-based coordinate
system. PointToClient/PointToScreen now correctly accounts for that.