Commit Graph

4239 Commits (3634e563c4a2a09c3bdb12e15ab1a057c446e14d)

Author SHA1 Message Date
Ryan C. Gordon 3634e563c4 metal: SDL_UpdateYUVTexture shouldn't swap planes based on format. 2018-09-01 20:47:12 -04:00
Sam Lantinga 34237b80f4 Better fix to make sure we're only returning controllers from the HIDAPI joystick API 2018-08-31 18:10:21 -07:00
Sam Lantinga 4ffcd88ca2 Removed VID/PID 0x1532/0x0037, which was listed in the Linux kernel as a Razer Sabertooth, because at least one variant of the Razer DeathAdder mouse shows up with this VID/PID. 2018-08-31 17:47:34 -07:00
Ozkan Sezer faf8f8b86b fix permissions 2018-08-30 12:50:10 +03:00
Sam Lantinga 5ef8eb49be Don't show the Razer Raiju sound interface as a game controller 2018-08-29 20:55:02 -07:00
Sam Lantinga 90a5607d32 Fixed compiler warning and use higher precision in angle calculation 2018-08-29 20:23:42 -07:00
Sam Lantinga 207428b444 Don't rumble Bluetooth PS4 controllers by default, as that switches the controller into extended input report mode, which breaks games that use DirectInput. 2018-08-29 20:23:39 -07:00
Sam Lantinga 16ccff3c56 Fixed whitespace 2018-08-29 20:23:36 -07:00
Sam Lantinga fda14741ac Fixed Xbox One S Bluetooth support on Mac OS X 2018-08-29 18:56:54 -07:00
Ozkan Sezer b6aaefc791 SDL_evdev.c: undefine _THIS before redefining it.
src/core/linux/SDL_evdev.c:104:1: warning: "_THIS" redefined
In file included from src/core/linux/../../events/SDL_events_c.h:26,
                 from src/core/linux/SDL_evdev.c:45:
src/core/linux/../../events/../video/SDL_sysvideo.h:146:1: warning: this is the location of the previous definition
2018-08-29 11:04:02 +03:00
Sam Lantinga 92396f7d74 Fixed Windows build 2018-08-28 16:19:31 -07:00
Sam Lantinga 404ba5eea8 Fixed bug 4229 - Add support for ABGR format in DirectFB renderer
Alexandre

DirectFB supports 32-bit ABGR pixel format via DSPF_ABGR, but SDL doesn't map SDL_PIXELFORMAT_ABGR8888 to DSPF_ABGR.

A patch is attached and should add support for ABGR pixel format devices.
2018-08-28 13:37:11 -07:00
Andreas M?ller 87bc1fb552 GLES2: Get sin/cos out of vertex shader
The only place angle is activated and causes effect is RenderCopyEx. All other
methods which use vertex shader, leave angle disabled and cause useless sin/cos
calculation in shader.

To get around shader's interface is changed to a vector that contains results
of sin and cos. To behave properly when disabled, cos value is set with offset
-1.0 making 0.0 default when deactivated.

As nice side effect it simplifies GLES2_UpdateVertexBuffer: All attributes are
vectors now.

Additional background:

* On RaspberryPi it gives a performace win for operations. Tested with
  [1] numbers go down for 5-10% (not easy to estimate due to huge variation).
* SDL_RenderCopyEx was tested with [2]
* It works around left rotated display caused by low accuracy sin implemetation
  in RaspberryPi/VC4 [3]

[1] https://github.com/schnitzeltony/sdl2box
[2] https://github.com/schnitzeltony/sdl2rendercopyex
[3] https://github.com/anholt/mesa/issues/110

Signed-off-by: Andreas M?ller <schnitzeltony@gmail.com>
2018-08-28 12:57:51 -07:00
Sam Lantinga 044b00dcae Fixed the DirectFB renderer not being enabled in autoconf builds 2018-08-27 11:51:05 -07:00
Sam Lantinga a1ca84411e Update the cursor clipping each frame, in case it was stolen by another application. 2018-08-26 20:37:23 -07:00
Sam Lantinga 15b3794f11 Only reset the clip rect if it's currently the rect we previously clipped.
This prevents us from clearing the clip rect globally when another application has set it.

There's also an experimental change to regularly update the clip rect for a window defensively, in case someone else has reset it. It works well, but I don't know if it's cheap enough to call as frequently as it would be called now, and might have other undesirable side effects.

Also fixed whitespace and SDL coding style
2018-08-26 10:34:23 -07:00
Sam Lantinga 09ab752aa3 Implement SDL_HapticStopEffect on Android (thanks Rachel!) 2018-08-24 10:41:57 -07:00
Jeremy Ong a794126d56 vulkan: SDL_Vulkan_GetInstanceExtensions should accept a NULL window.
Fixes Bugzilla #4235.
2018-08-24 09:49:48 -04:00
Sam Lantinga a003fa0a05 Implemented SDL_GetDisplayOrientation() on Android (thanks Rachel!) 2018-08-23 14:05:25 -07:00
Ryan C. Gordon df5d565f48 cmake: add sensor subsystem to the build. 2018-08-23 14:32:30 -04:00
Sam Lantinga 8adadf8f0e Added documentation for additional Android sensors 2018-08-23 10:51:54 -07:00
Sam Lantinga de5367a612 Added display event files to the Visual Studio projects 2018-08-23 02:48:47 -07:00
Sam Lantinga 5901fe466b Added display event files to the Mac OS X project 2018-08-23 02:24:31 -07:00
Sam Lantinga 50d5002533 Fixed build 2018-08-23 02:21:17 -07:00
Sam Lantinga 088070e5a8 Moved display orientation handling on iOS out to a separate function for Qt apps 2018-08-22 23:47:29 -07:00
Sam Lantinga f225af0c1e Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes.
Documented the values returned by the accelerometer and gyroscope sensors
2018-08-22 21:48:28 -07:00
Sam Lantinga f1bc1c1274 Fixed crash trying to open HIDAPI controller as a haptics device on Windows 2018-08-22 17:44:28 -07:00
Sam Lantinga 38ae49880f Updated required Android SDK to API 26, to match Google's new App Store requirements 2018-08-21 20:46:25 -07:00
Sam Lantinga 7f4860e2be Doh.. __IPHONEOS__ is defined on tvOS 2018-08-21 20:38:22 -07:00
Sam Lantinga 74e99f7416 Don't use CoreMotion on tvOS 2018-08-21 20:34:09 -07:00
Sam Lantinga b8ae2c1860 Fixed UWP build 2018-08-21 20:20:54 -07:00
Sam Lantinga 6f758ad25f Moved SDL_IsTablet() to a cross-platform API function 2018-08-21 20:03:54 -07:00
Sam Lantinga e9f6805fc6 Removed dependency on C++ runtime on iOS 2018-08-21 19:42:19 -07:00
Sam Lantinga c6647bf9c9 Added the iOS sensor implementation 2018-08-21 17:24:12 -07:00
Sam Lantinga bdbc06b027 Fixed bug 4228 - Clean-up Xcode projects
C.W. Betts

This cleans up the Xcode project by setting the Xcode groups to the corresponding directories. This also removes the Resources folder in OS X's Products group and adds the CoreBluetooth framework to the iOS tests (this is needed due to the addition of hidapi.
2018-08-21 16:47:44 -07:00
Sam Lantinga c5bcefa7e8 Fixed duplicate definition of SDL_JoystickID 2018-08-21 13:44:11 -07:00
Sam Lantinga 7749ee2a43 Added the dummy sensor driver to the Visual Studio projects 2018-08-21 13:42:44 -07:00
Sam Lantinga 3e5dbc694a Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
Sam Lantinga 7c3040e08a First pass on the new SDL sensor API 2018-08-21 12:11:34 -07:00
Sam Lantinga c2791fc60d Don't crash if the app doesn't have Bluetooth permissions 2018-08-21 11:59:13 -07:00
Sam Lantinga 2a4999b4bb By default just build for 32-bit ARM and x86 2018-08-21 11:44:08 -07:00
Sam Lantinga 109544ca04 Add SDL_IsTablet() to Android and iOS SDL. 2018-08-21 11:23:47 -07:00
Sam Lantinga b09b25f6e4 Don't crash if the app doesn't have Bluetooth permissions 2018-08-21 11:07:56 -07:00
Sam Lantinga ad1e3c2a4c Fixed Android build error 2018-08-21 10:37:26 -07:00
Sam Lantinga 0d22559e30 Fixed Android build error 2018-08-21 10:25:30 -07:00
Sam Lantinga 5dfa4043a3 Fixed warnings building on Mac OS X 64-bit 2018-08-20 21:19:17 -07:00
Sam Lantinga 6b3f11e2a3 Fixed code style 2018-08-20 21:18:56 -07:00
Ryan Speets aeea6b9b1f Emscripten: Fixed SDL_SYSTEM_CURSOR_SIZEALL 2018-08-18 12:30:04 +01:00
Ozkan Sezer 90454b1ece SDL_hidapi_ps4.c: define NTDDI_VISTA / _WIN32_WINNT_VISTA if not defined
it still needs a Vista or newer Platform SDK to build, though.
2018-08-16 11:01:02 +03:00
Sam Lantinga 7d3a7ef827 Use a single hint for both Xbox 360 and Xbox One controllers, since they are often the same driver. 2018-08-15 23:35:54 -07:00