Commit Graph

10682 Commits

Author SHA1 Message Date
Sam Lantinga
b59054a215 Fixed creating an Android game controller mapping for HIDAPI devices on initialization 2018-09-17 11:35:22 -07:00
Ozkan Sezer
0839e5f252 do not export hidapi symbols from SDL dlls (bug #4259). 2018-09-15 14:28:10 +03:00
Ozkan Sezer
d40d6c9e6c acinclude: rename ax_gcc_x86_cpuid.m4.htm to ax_gcc_x86_cpuid.m4 2018-09-15 09:24:04 +03:00
Ozkan Sezer
17c050cf15 fix permissions 2018-09-15 08:11:50 +03:00
Sam Lantinga
75f396a107 Added hints SDL_HINT_MOUSE_DOUBLE_CLICK_TIME and SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to allow tuning double-click sensitivity.
Also increased the default double-click radius to 32 pixels to be more forgiving for touch interfaces
2018-09-14 19:26:26 -07:00
Sam Lantinga
393f3ab5c4 Guard against Steam Controller input when we're shutting down. 2018-09-14 18:31:03 -07:00
Sam Lantinga
f6e4a90c39 Use atomic reference counting for the HID device object 2018-09-14 18:31:01 -07:00
Sam Lantinga
75ef160c65 Fixed crash launching under Steam on Mac OS X 2018-09-14 12:41:29 -07:00
Sam Lantinga
f4a9580326 Fixed Chinese IME support (thanks 树子。!) 2018-09-10 23:01:33 -07:00
Sam Lantinga
aa37b0e028 Fixed building on tvOS 2018-09-10 23:00:09 -07:00
Sam Lantinga
bfe8b97590 Fixed building on tvOS without any sensor support 2018-09-10 22:59:49 -07:00
Ozkan Sezer
ef5920a371 hidapi/SDL_hidapijoystick.c: fix build in C90 mode:
src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_InitializeDiscovery':
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: 'true' undeclared (first use in this function)
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: (Each undeclared identifier is reported only once
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: for each function it appears in.)
src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_UpdateDiscovery':
src/joystick/hidapi/SDL_hidapijoystick.c:339: error: 'true' undeclared (first use in this function)
src/joystick/hidapi/SDL_hidapijoystick.c:341: error: ISO C90 forbids mixed declarations and code
2018-09-07 11:03:24 +03:00
Ozkan Sezer
3918965ae9 SDL_sensor.h, SDL_video.h: remove comma at end of enumerator lists.
Avoids gcc -pedantic warnings, closes bug #4253.
2018-09-07 10:47:50 +03:00
Ryan C. Gordon
cdac13e19c metal: Make sure layer drawableSize is adjusted on resize.
Fixes Bugzilla #4250.
2018-09-06 00:56:13 -04:00
Ryan C. Gordon
3ac049e49c Fixed a comment typo. 2018-09-05 21:24:13 -04:00
Sam Lantinga
1c88fc1cbf Fixed bug 4002 - Android, nativeRunMain() fails on some phone with arm64-v8a
Sylvain

The issue is totally reproducible on P8 Lite.

"The dlopen() call doesn't include the app's native library directory. The behavior of  dlopen() by Android is not guaranteed".

Workaround in getMainSharedObject()

Just replace
    return library;
with
    return getContext().getApplicationInfo().nativeLibraryDir + "/" + library;
2018-09-05 15:54:46 -07:00
Sam Lantinga
88d7d340f8 Speculatively disable rumble on the Razer Panthera Evo, which doesn't have rumble motors and probably hangs in the same way the Panthera does. 2018-09-05 15:28:06 -07:00
Sam Lantinga
1da5d57b3d Updated Xcode library version to match libtool output with Ozkan's change 2018-09-05 13:04:50 -07:00
Sam Lantinga
47eb5c669e Don't overwrite the default binding when changing the binding for a controller that was using the default. 2018-09-05 12:16:01 -07:00
Sam Lantinga
7fe3c4b2ad Added binding for Mad Catz FightStick TE S+ (PS3) on Mac OS X 2018-09-05 11:24:23 -07:00
Sam Lantinga
5d8d1ac764 Added support for the Razer Panthera Fightstick
Fixed bindings for the Mad Catz FightStick TE S+
2018-09-05 11:18:50 -07:00
Ozkan Sezer
1d8d253674 CMakeLists.txt: fix typo SDL_SENSORS_DISABLED -> SDL_SENSOR_DISABLED 2018-09-02 23:57:06 +03:00
Ryan C. Gordon
846526767d test: Makefile should copy .dat files for testoverlay2. 2018-09-02 00:35:11 -04:00
Ryan C. Gordon
3987531781 metal: SDL_UpdateYUVTexture shouldn't swap planes based on format. 2018-09-01 20:47:12 -04:00
Sam Lantinga
a28c07e23d 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
789f59f5df 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
3512d4dbbb fix permissions 2018-08-30 12:50:10 +03:00
Sam Lantinga
aaa121432e Don't show the Razer Raiju sound interface as a game controller 2018-08-29 20:55:02 -07:00
Sam Lantinga
07f8de33f6 Fixed compiler warning and use higher precision in angle calculation 2018-08-29 20:23:42 -07:00
Sam Lantinga
f3e84167ad 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
29ce0288aa Fixed whitespace 2018-08-29 20:23:36 -07:00
Sam Lantinga
3de426698b Fixed Xbox One S Bluetooth support on Mac OS X 2018-08-29 18:56:54 -07:00
Ozkan Sezer
0dd9dfe464 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
61f11dafb5 Fixed Windows build 2018-08-28 16:19:31 -07:00
Sam Lantinga
eddc4411e4 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
eb2445d1ea 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
a8221be02b Fixed the DirectFB renderer not being enabled in autoconf builds 2018-08-27 11:51:05 -07:00
Sam Lantinga
e40839a791 Update the cursor clipping each frame, in case it was stolen by another application. 2018-08-26 20:37:23 -07:00
Sam Lantinga
178027302b 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
7ac9576351 Implement SDL_HapticStopEffect on Android (thanks Rachel!) 2018-08-24 10:41:57 -07:00
Jeremy Ong
1bb7162872 vulkan: SDL_Vulkan_GetInstanceExtensions should accept a NULL window.
Fixes Bugzilla #4235.
2018-08-24 09:49:48 -04:00
Sam Lantinga
3020a91dba Implemented SDL_GetDisplayOrientation() on Android (thanks Rachel!) 2018-08-23 14:05:25 -07:00
Ryan C. Gordon
dd62d1f745 cmake: add sensor subsystem to the build. 2018-08-23 14:32:30 -04:00
Sam Lantinga
c6e6ed6258 Added documentation for additional Android sensors 2018-08-23 10:51:54 -07:00
Sam Lantinga
88063d4086 Added display event files to the Visual Studio projects 2018-08-23 02:48:47 -07:00
Sam Lantinga
9a8ab9d42a Added display event files to the Mac OS X project 2018-08-23 02:24:31 -07:00
Sam Lantinga
3191d386c4 Fixed build 2018-08-23 02:21:17 -07:00
Sam Lantinga
de6d77b437 Moved display orientation handling on iOS out to a separate function for Qt apps 2018-08-22 23:47:29 -07:00
Sam Lantinga
2d69f1cbf5 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
c37eebf0e9 Fixed crash trying to open HIDAPI controller as a haptics device on Windows 2018-08-22 17:44:28 -07:00