Commit Graph

7394 Commits

Author SHA1 Message Date
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
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
Sam Lantinga
9505b76b0d Moved SDL_IsTablet() to a cross-platform API function 2018-08-21 20:03:54 -07:00
Sam Lantinga
605c269317 Removed dependency on C++ runtime on iOS 2018-08-21 19:42:19 -07:00
Sam Lantinga
a9118643f8 Added the iOS sensor implementation 2018-08-21 17:24:12 -07:00
Sam Lantinga
47d7fd9663 Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
Sam Lantinga
6a6db94f54 First pass on the new SDL sensor API 2018-08-21 12:11:34 -07:00
Sam Lantinga
ce26218414 Add SDL_IsTablet() to Android and iOS SDL. 2018-08-21 11:23:47 -07:00
Sam Lantinga
433e09833f Fixed Android build error 2018-08-21 10:25:30 -07:00
Sam Lantinga
30509f97ac Fixed warnings building on Mac OS X 64-bit 2018-08-20 21:19:17 -07:00
Sam Lantinga
9673f8bea2 Fixed code style 2018-08-20 21:18:56 -07:00
Ryan Speets
28487d49c2 Emscripten: Fixed SDL_SYSTEM_CURSOR_SIZEALL 2018-08-18 12:30:04 +01:00
Ozkan Sezer
f3984d8f40 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
78df4310c2 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
bd3cb01bc5 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
650065c296 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
817489abbf Added Windows Xbox controller state packet handling, for completeness. 2018-08-15 19:53:36 -07:00
Sam Lantinga
e36af84e04 Fixed input from the Steam Virtual Gamepad on Mac OS X 2018-08-15 19:53:34 -07:00
Sam Lantinga
fc31c30fc7 Use SDL specific window class to avoid conflicting with Steam 2018-08-15 19:53:31 -07:00
Sam Lantinga
cbf66c4939 Catch device removal as well as device arrival on Windows 2018-08-15 19:53:30 -07:00
Sam Lantinga
87dc0a72ab Turned off debug messages 2018-08-15 19:53:28 -07:00
Sam Lantinga
142d9c78c3 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
e356abff7b Fixed Mac OS X build 2018-08-15 19:53:24 -07:00
Sam Lantinga
4e722009a6 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
5392bd02ae libm: one more static analysis fix. 2018-08-10 15:22:02 -04:00
Ryan C. Gordon
f0759d0233 haiku: Patched to compile with new joystick interfaces. 2018-08-10 15:04:08 -04:00
Ryan C. Gordon
ec9e4e7df7 bsd: Patched to compile.
(I think.)
2018-08-10 14:54:26 -04:00
Ryan C. Gordon
4866063a65 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
de4e0e2f84 emscripten: Patched to compile with new joystick interfaces. 2018-08-10 14:32:30 -04:00
Ryan C. Gordon
e391a269c1 joystick: define inline to SDL_INLINE 2018-08-10 14:10:47 -04:00
Ryan C. Gordon
cb41f10d60 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
5c483cdfd5 SDL_hidapi_ps4.c: lowercase windows header names. 2018-08-10 11:50:55 +03:00
Sam Lantinga
f06a191048 Added missing files from previous commits 2018-08-09 16:05:48 -07:00
Sam Lantinga
3ee8baee46 Added notes that this code was contributed by Valve 2018-08-09 16:04:45 -07:00
Sam Lantinga
1d18743335 There's no controller that's supported by both XInput and HIDAPI 2018-08-09 16:04:34 -07:00
Sam Lantinga
efdea54cd7 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
08513a7686 Sam Lantinga <slouken@libsdl.org> 2018-08-06 13:00 -0700
Backed out changeset 448e9f627e71
http://hg.libsdl.org/SDL/rev/e1f4191461a0
2018-08-09 16:04:21 -07:00
Sam Lantinga
d57310bf62 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/448e9f627e71
2018-08-09 16:04:18 -07:00
Sam Lantinga
f5908635ae 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
59594ecdba Fixed Windows build 2018-08-09 16:03:29 -07:00
Sam Lantinga
a7f26f9e6c Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
2018-08-09 16:00:17 -07:00
Ryan C. Gordon
8d4bb4e555 libm: Don't let Visual Studio generate an implicit memset() call. 2018-08-08 15:39:20 -04:00
Ryan C. Gordon
cea9c89bcc backout INFINITY change...of course Visual Studio doesn't have it. 2018-08-08 12:36:54 -04:00