Commit Graph

270 Commits

Author SHA1 Message Date
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
David Ludwig
44c0b2da87 WinRT: minor code-comment cleanups 2015-12-31 01:54:11 -05:00
David Ludwig
6823a22162 WinRT: fixed bug whereby a Win8.x app's SDL_Window wasn't getting de-marked as maximized (on window restore) 2015-12-31 01:50:30 -05:00
David Ludwig
d8aa066288 Fixed Bug 3217 - WinRT: after alt-tab'ing back into fullscreen app, mouse cursor is sometimes wrong 2015-12-31 01:40:50 -05:00
David Ludwig
fa7c15ce1f WinRT: made bug 3202/3213's fix apply for WinRT apps 2015-12-27 22:26:27 -05:00
David Ludwig
f2f435ee45 WinRT: fixed bug: Back button(s) weren't working on Win10
Many thanks go to Sylvain Becker for providing details on the fix!
2015-12-09 21:34:56 -05:00
David Ludwig
25abce513d WinRT: added Win10/UWP (Universal Windows Platform) support
"UWP" appears to be Microsoft's new name for WinRT/Windows-Store APIs.

This set of changes updates SDL's WinRT backends to support the Win10 flavor
of WinRT.  It has been tested on Win10 on a desktop.  In theory, it should
also support Win10 on other devices (phone, Xbox One, etc.), however further
patches may be necessary.

This adds:
- a set of MSVC 2015 project files, for use in creating UWP apps
- modifications to various pieces of SDL, in order to compile via MSVC 2015 +
  the Win10 API set
- enables SDL_Window resizing and programmatic-fullscreen toggling, when using
  the WinRT backend
- WinRT README updates
2015-11-29 19:33:11 -05:00
David Ludwig
623898f70b WinRT: lots of display and windowing related fixes
This change-set fixes a lot of windowing related bugs, especially with
regards to Windows 8.x apps running on Windows 10 (which was the driver for
this work).  The primary fixes include:
* listed display modes were wrong, especially when launching apps into a
  non-fullscreen space
* reported window flags were often wrong, especially on Windows 10
* fullscreen/windowed mode switches weren't failing (they are not
  programmatically possible in Win 8.x apps).
2015-11-26 00:41:39 -05:00
Sam Lantinga
11f2a9f8c4 Fixed bug 3168 - xinput build failure with dxsdk
Ozkan Sezer

Yes, the annotations can actually be removed.  They are used only by MSVC and aren't vital.
2015-11-16 21:20:38 -08:00
David Ludwig
dc804c0e1a WinRT: fixed build error in latest XInput code
This change has also been tested as buildable + runnable on Win32 + MSVC 2015,
2013, 2012, and 2010.  It may fix similar build errors (in XInput code) that
are appearing in MingW builds (on buildbot).
2015-11-14 21:29:14 -05:00
Sam Lantinga
a0c4b56ff9 SDL - added new SDL_JoystickCurrentPowerLevel() API that returns the battery level of the selected joystick. Currently only implemented for XInput devices, other platforms are a TODO.
CR: Sam
2015-09-30 15:39:30 -07:00
Philipp Wiesemann
10daf1f4d3 Android: Removed three internal functions not used by SDL.
They were not needed internally since the switch to the common EGL backend.

Thanks to the SDL mailing list for pointing out that the functions seem unused.
2015-09-27 20:12:47 +02:00
Philipp Wiesemann
efad04c317 Android: Added check if Java method for APK expansion file exists. 2015-09-18 21:26:46 +02:00
Philipp Wiesemann
6e7c479ec2 Android: Fixed trying to read from APK expansion files without version hint set.
This also fixed overwriting the asset error message which is more useful if no
APK expansion files are available and the requested file was not found.
2015-09-17 22:30:24 +02:00
Philipp Wiesemann
92ca42d940 Android: Renamed SDLActivity's Java method used for APK expansion files.
The name was not correct.
2015-09-17 22:24:54 +02:00
Alex Szpakowski
a506f1cbc7 Windows: Try to use xinput9_1_0.dll if XInput 1.4 and 1.3 are not available.
XInput "9.1.0" ships with Windows Vista and 7 systems, but it lacks some features, including support for detecting Guide button presses.
2015-09-14 22:50:55 -03:00
Philipp Wiesemann
e8757e873e Android: Changed return type of four JNI functions from int to jint. 2015-09-05 20:21:52 +02:00
Sam Lantinga
82eec4b630 Fixed whitespace in SDL_evdev.c 2015-06-24 17:55:38 -07:00
Sam Lantinga
9f50d63dd5 Fixed an issue with mouse/keyboard removal
Sometimes, on removal SDL_EVDEV_udev_callback() gets called with zero udev_class. This in turn seems to be caused the SDL_udev.c:guess_device_class() failing to find the attributes of the parent device.

Apparently this is normal, attributes are not guaranteed to be in place during removal, depending on timing. This lack of attributes causes guess_device_class() to return zero.

This fix mimics the code in linux/SDL_sysjoystick.c:joystick_udev_callback() which effectively has the same fix already in place.
2015-06-24 17:54:39 -07:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00