Ryan C. Gordon
367f9b915c
wayland: Fixed missing window sizing events.
...
Fixes Bugzilla #4242 .
2018-10-05 17:24:03 -04:00
Sam Lantinga
f01cdcedbc
It turns out HIDAPI for Xbox controllers doesn't allow background input, so we won't enable it by default on Windows.
2018-10-05 01:41:59 -07:00
Sam Lantinga
41ee51b9a8
Fixed updating bindings for controllers using the wildcard mappings
2018-10-04 15:23:42 -07:00
Ryan C. Gordon
93fb710a46
evdev: Don't initialize struct sigaction with "{ 0 }".
...
It causes warnings on some platforms, depending on the actual definition of
sigaction, and since this is static data, it'll be zero'd out anyhow.
2018-10-03 16:54:24 -04:00
Sam Lantinga
1944556171
Make sure we don't read and write to HIDAPI at the same time, it's not thread-safe on Windows
2018-10-02 20:51:33 -07:00
Sam Lantinga
6e35e42145
Working on bug 3921 - Add some Fastpath to BlitNtoNKey and BlitNtoNKeyCopyAlpha
...
Sylvain
I did various benches. with clang 6.0.0 on linux, and ndk-r16b on android (NDK_TOOLCHAIN_VERSION=clang).
- still see a x10 speed factor.
- with duff_loops, it does not use vectorisation (but doesn't seem to be a problem).
on linux my patch is already at full speed on -O2, whereas the duff_loops need -O3 (200 ms at -03, and 300ms at -02).
I realized that on Android, I had a slight variation which fits best.
both on linux with -O2 and -O3, and on android with 02/03 and armeabi-v7a/arm64.
Here's the patch.
2018-10-01 14:43:03 -07:00
Ozkan Sezer
922623e1b6
SDL_blit_N.c (BlitNtoNKeyCopyAlpha): fix -Wshadow warnings by adding _
...
suffix to the temp Pixel local in the DUFFS_LOOP.
SDL_blit.h (ASSEMBLE_RGB): add _ prefix to temp Pixel locals to avoid
any possible shadowings.
The warnings were like the following:
In file included from src/video/SDL_blit_N.c:26:0:
src/video/SDL_blit_N.c: In function 'BlitNtoNKeyCopyAlpha':
src/video/SDL_blit_N.c:2421:24: warning: declaration of 'Pixel' shadows a previous local [-Wshadow]
Uint32 Pixel = ((*src32 & rgbmask) == ckey) ? *dst32 : *src32;
^
src/video/SDL_blit.h:475:21: note: in definition of macro 'DUFFS_LOOP8'
case 0: do { pixel_copy_increment; /* fallthrough */ \
^
src/video/SDL_blit_N.c:2419:13: note: in expansion of macro 'DUFFS_LOOP'
DUFFS_LOOP(
^
src/video/SDL_blit_N.c:2399:12: warning: shadowed declaration is here [-Wshadow]
Uint32 Pixel;
^
2018-10-01 21:29:11 +03:00
Sam Lantinga
b251876126
commit c6b28f46b8116552ec2b38d1d3c8535df28ba7a1
...
Author: Anthony Pesch <inolen@gmail.com>
Date: Fri May 4 20:21:21 2018 -0400
Added SDL_AUDIO_ALLOW_SAMPLES_CHANGE flag enabling users of SDL_OpenAudioDevice to get
the sample size of the actual hardware buffer vs having a stream created to handle the
delta
2018-10-01 09:47:10 -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
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
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
109544ca04
Add SDL_IsTablet() to Android and iOS SDL.
2018-08-21 11:23:47 -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
Sam Lantinga
a2add1f683
Use the HIDAPI driver for Xbox controllers on Windows, and determine the XInput mapping at runtime for extended functionality like rumble and guide button.
2018-08-15 23:14:45 -07:00
Sam Lantinga
3f5ff751fe
Use a unified name list for Xbox 360 and Xbox One controllers for drivers that can handle both
2018-08-15 23:14:43 -07:00
Sam Lantinga
aad340eb86
Added Windows Xbox controller state packet handling, for completeness.
2018-08-15 19:53:36 -07:00
Sam Lantinga
63107524f6
Fixed input from the Steam Virtual Gamepad on Mac OS X
2018-08-15 19:53:34 -07:00
Sam Lantinga
0903e83553
Use SDL specific window class to avoid conflicting with Steam
2018-08-15 19:53:31 -07:00
Sam Lantinga
c88666580e
Catch device removal as well as device arrival on Windows
2018-08-15 19:53:30 -07:00
Sam Lantinga
641c674f2a
Turned off debug messages
2018-08-15 19:53:28 -07:00
Sam Lantinga
51902010c6
Remove the HIDAPI device if we get a read error from it
...
This fixes detecting PS4 controller disconnect on Mac OS X, where there isn't any device removed notification
2018-08-15 19:53:26 -07:00
Sam Lantinga
dfbd7f65a9
Fixed Mac OS X build
2018-08-15 19:53:24 -07:00
Sam Lantinga
ec74c318b9
Polling hid_enumerate() every 3 seconds causes freezes and stutters on some USB audio devices and mice.
...
We'll only enumerate devices when we get notification that the system devices have changed
2018-08-15 19:53:22 -07:00
Ryan C. Gordon
2dc04b4c11
libm: one more static analysis fix.
2018-08-10 15:22:02 -04:00
Ryan C. Gordon
67a48ad13a
haiku: Patched to compile with new joystick interfaces.
2018-08-10 15:04:08 -04:00
Ryan C. Gordon
e1ac643b32
bsd: Patched to compile.
...
(I think.)
2018-08-10 14:54:26 -04:00
Ryan C. Gordon
67764070f0
bsd: Update joystick code for new interfaces.
...
(this is an untested push to see if buildbot likes it.)
2018-08-10 14:42:40 -04:00
Ryan C. Gordon
b692c35237
emscripten: Patched to compile with new joystick interfaces.
2018-08-10 14:32:30 -04:00
Ryan C. Gordon
941f8ecffd
joystick: define inline to SDL_INLINE
2018-08-10 14:10:47 -04:00
Ryan C. Gordon
0b2863d45e
joystick: #if 0'd out some things that aren't currently used.
...
Fixes some compiler warnings.
2018-08-10 14:09:44 -04:00
Ozkan Sezer
a7c3d2af81
SDL_hidapi_ps4.c: lowercase windows header names.
2018-08-10 11:50:55 +03:00
Sam Lantinga
4f41f07d43
Added missing files from previous commits
2018-08-09 16:05:48 -07:00
Sam Lantinga
31b0224397
Added notes that this code was contributed by Valve
2018-08-09 16:04:45 -07:00
Sam Lantinga
99759bac82
There's no controller that's supported by both XInput and HIDAPI
2018-08-09 16:04:34 -07:00
Sam Lantinga
ab07ce1166
Don't update the device list for devices we know aren't supported
...
This should reduce HID enumeration (hitting the USB bus) if for some reason we're getting spammed with false device insert/removal events
2018-08-09 16:04:30 -07:00
Sam Lantinga
28e0c0eef7
Sam Lantinga <slouken@libsdl.org> 2018-08-06 13:00 -0700
...
Backed out changeset 794a209b2270
http://hg.libsdl.org/SDL/rev/2e2ecdac957c
2018-08-09 16:04:21 -07:00
Sam Lantinga
25a952e76f
Sam Lantinga <slouken@libsdl.org> 2018-08-06 11:58 -0700
...
Removed mapping for VID/PID 0x0079/0x0006, which is a generic PCB used in many different devices
http://hg.libsdl.org/SDL/rev/794a209b2270
2018-08-09 16:04:18 -07:00
Sam Lantinga
888bf1af69
Worked around bug with Sony PS Now PS3 controller where DirectInput polling will continue to return success after the controller is unplugged.
...
The code is now reliant on SDL_PrivateJoystickAdded() and SDL_PrivateJoystickRemoved() being called correctly when devices are added or removed on Windows
2018-08-09 16:03:50 -07:00
Sam Lantinga
f35e97ba8a
Fixed Windows build
2018-08-09 16:03:29 -07:00