Commit graph

76 commits

Author SHA1 Message Date
Ozkan Sezer
6520a3dbe0 fix permissions 2018-11-15 07:20:02 +03:00
Sam Lantinga
2005ea6ca2 Fixed bug 3193 - Dualshock 3's motion sensors overwrite analog stick
maxxus

The Dualshock 3's motion sensors don't seem to be reported by the call to EVIOCGBIT but they still send EV_ABS events.  Because they're not reported by EVIOCGBIT they're not assigned a proper axis ids and the default of 0 is used, which is the valid id for the left analog sticks left/right axis.
2018-11-14 13:37:22 -08:00
Ozkan Sezer
0f6d45f840 fix permissions 2018-10-23 09:10:02 +03:00
Sam Lantinga
c47d44bc42 Add exception handling to Android hidapi. 2018-10-22 14:55:42 -07:00
Sam Lantinga
07d64253a1 Fixed bug 4324 - Xcode 10 - more cleanup for macOS and iOS projects
Dominik Reichardt

Xcode warns about
"Traditional headermap style is no longer supported; please migrate to using separate headermaps and set 'ALWAYS_SEARCH_USER_PATHS' to NO."
Just doing the latter is enough to silence the warning without ill effects on compiling. This affects the macOS Xcode projects as well as the iOS projects. Definitely not a bug but an annoying warning that could go away.
2018-10-18 15:41:50 -07:00
Ozkan Sezer
0a9f975af7 fix permissions 2018-09-15 08:11:50 +03:00
Sam Lantinga
9f17ce1ed2 Use atomic reference counting for the HID device object 2018-09-14 18:31:01 -07:00
Sam Lantinga
a316223159 Fixed building on tvOS without any sensor support 2018-09-10 22:59:49 -07:00
Ozkan Sezer
5bafa801d0 fix permissions 2018-08-30 12:50:10 +03:00
Sam Lantinga
f69485f745 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
b8c45ccb9c Removed dependency on C++ runtime on iOS
--HG--
rename : src/hidapi/ios/hid.mm => src/hidapi/ios/hid.m
2018-08-21 19:42:19 -07:00
Sam Lantinga
da334dae1a Added the iOS sensor implementation 2018-08-21 17:24:12 -07:00
Sam Lantinga
53f72becea 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
db39b4811f 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
Ozkan Sezer
53e38a8dfc ran 'chmod -x' on many files 2018-06-12 14:00:15 +03:00
Sam Lantinga
5e85fbd95c Added missing file to tvOS build 2018-02-24 08:40:30 -08:00
Sam Lantinga
46339ac88b Moved deployment target values to project settings 2017-12-12 22:30:21 -08:00
Sam Lantinga
1872077ebd Parameterized the All (target platform) build target scripts so they can be used in other projects 2017-12-12 21:59:39 -08:00
Sam Lantinga
f54dfe1db9 Renamed Xcode build targets so it's easier to copy files out of build directories on the command line
Also enabled bitcode, which is needed for App Store builds
2017-12-12 12:14:55 -08:00
Sam Lantinga
6f4390917e Added SDL_uikitmetalview.m to the tvOS project 2017-12-12 11:29:00 -08:00
Sam Lantinga
7e4560664b Fixed building for simulators or older iOS SDKs 2017-12-07 17:47:01 -08:00
Sam Lantinga
40be7cbc97 Fixed compiling Metal renderer on iOS 2017-12-07 17:12:03 -08:00
Sam Lantinga
145d2469ae Updated SDL's YUV support, many thanks to Adrien Descamps
New functions get and set the YUV colorspace conversion mode:
	SDL_SetYUVConversionMode()
	SDL_GetYUVConversionMode()
	SDL_GetYUVConversionModeForResolution()

SDL_ConvertPixels() converts between all supported RGB and YUV formats, with SSE acceleration for converting from planar YUV formats (YV12, NV12, etc) to common RGB/RGBA formats.

Added a new test program, testyuv, to verify correctness and speed of YUV conversion functionality.
2017-11-12 22:51:12 -08:00
Sam Lantinga
876a6b2319 Updated SDL iOS project for tvOS 2017-10-26 10:49:33 -07:00
Sam Lantinga
1e46b7fc9a Added stubs for simple Steam Controller support 2017-09-22 08:30:52 -07:00
Sam Lantinga
281e904a4f Fixed bug 3837 - Change project settings for Xcode 9?
Mark Callow

Xcode 9 emits a warning to validate project settings. The changes it proposes are

1. [iOS] Update the iOS deployment target to 8.0 since Xcode does
   not support anything older.

2. [macOS] Target 'Framework' - Automatically Select Archectures.

3. [iOS & macOS] Turns on a bunch more compile warnings, a *lot* more on iOS.

4. [iOS & macOS] Turn on "Missing Localizability".

I want to confirm if it is ok to accept these changes and submit updated project files.

Since Alex Szpakowski has just removed iOS 7 guard ifdef's, I'm guessing 1 isn't a problem.

2 is probably ok for anyone building themselves. I wonder if it may cause problems for building distribution binaries.

3 shouldn't be a problem either provided any newly emitted warnings are fixed.

4 I am unfamiliar with. The description says "This will turn on the static analyzer to check for "Missing Localizability", because this project is localized for multiple languages." I suppose this may cause new warnings.
2017-09-22 12:26:54 -07:00
Ryan C. Gordon
a566435db1 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.

--HG--
extra : rebase_source : cb3bb332146125366b5242c0d7444f44638733d9
extra : amend_source : c72ebb6d3a92efc3fdd085ce3b6d4b1d7f573cc9
2017-08-27 22:15:57 -04:00
Ryan C. Gordon
638cb97a63 xcode: Make sure SDL_dataqueue sources are included in all targets. 2016-12-06 13:33:02 -05:00
Ryan C. Gordon
6b6da8150e xcode: updated macOS and iOS project files with SDL_dataqueue sources. 2016-12-06 12:30:31 -05:00
Alex Szpakowski
a98de9e4f7 CoreAudio iOS/tvOS: Use AVFoundation instead of AudioSession. Fixes audio on tvOS.
Note that linking with AVFoundation is now required if you don't disable SDL_audio compilation on iOS and tvOS.

--HG--
rename : src/audio/coreaudio/SDL_coreaudio.c => src/audio/coreaudio/SDL_coreaudio.m
2016-09-15 19:59:57 -03:00
Sam Lantinga
d3f9978231 Fixed building for both iOS and tvOS on Xcode 8 2016-09-14 08:45:35 -07:00
Sam Lantinga
2cbc2b95ec Allow targeting tvOS 2016-09-14 07:09:35 -07:00
Alex Szpakowski
398a513d09 Initial Apple TV / tvOS support.
The Apple TV remote is currently exposed as a joystick with its touch surface treated as two axes. Key presses are also generated when its buttons and touch surface are used.

A new hint has been added to help deal with deciding whether to background the app when the remote's menu button is pressed: SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS.
2016-09-13 22:18:06 -03:00
Alex Szpakowski
5935e90124 Enable more compiler warnings in the Xcode projects (based on Xcode 8's suggestion), made some integer downcasts explicit. 2016-09-13 19:51:10 -03:00
Ryan C. Gordon
26a75839f4 audio: Removed internal SDL_audiomem.h and macros.
I think this was important for SDL 1.2 because some targets needed
special device memory for DMA buffers or locked memory buffers for use in
hardware interrupts or something, but since it just defines to SDL_malloc
and SDL_free now, I took it out for clarity's sake.

--HG--
extra : histedit_source : 57b48e44e65de9ce4e16604167db325df05bdf98%2C31d881e4d1b5eeba771f04bb43be0d23c3e605ce
2016-08-05 01:44:15 -04:00
Alex Szpakowski
53933185d8 iOS: Implemented clipboard support. 2016-02-03 20:32:55 -04:00
Alex Szpakowski
0023cbb086 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -03:00
Alex Szpakowski
01874284f5 Fixed a crash on iOS when none of the orientations in Info.plist match the SDL window's actual orientation.
Fixes bug #2967.
2015-05-05 16:16:10 -03:00
Alex Szpakowski
9e4e1cac69 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
--HG--
branch : iOS-improvements
2014-08-06 03:24:16 -03:00
Sam Lantinga
11238fe16a Fixed bug 2626 - iOS: fix test and template Xcode projects and build scripts to link with CoreMotion
Alex Szpakowski

Now that SDL on iOS requires CoreMotion to be linked, some of the Xcode projects included with the SDL source (such as the iOS tests and the iOS app template) as well as the premake and automake scripts need to be updated.

I've attached a patch which does so. It also fixes the SDL Xcode project to build for 64-bit ARM as well as armv7 by default (or whatever the default ARM targets are for the Xcode version used), which is what the iOS app template expects.
2014-07-07 10:42:19 -07:00
Sam Lantinga
ff201dbea2 Fixed bug 2603 - iOS: update joystick accelerometer code to use CoreMotion instead of the deprecated UIAccelerometer
Alex Szpakowski

SDL's code for exposing the accelerometer as a joystick on iOS currently uses UIAccelerometer, which was superseded by the CoreMotion framework and deprecated since iOS 5.

The UIAccelerometer code still works (for now), but it also throws deprecation warnings whenever SDL is built for iOS, since SDL's deployment target is no longer below iOS 5.

I've created a patch which replaces the old UIAccelerometer code with a replacement based on the CoreMotion framework. It has identical functionality (to SDL users), however iOS apps are now required to link to the CoreMotion framework when using SDL.
2014-06-25 00:20:21 -07:00
Sam Lantinga
461ff8bf35 Updated iOS deployment target to iOS 5.1 2014-05-10 12:34:16 -07:00
Sam Lantinga
a7d2ebb8d6 Integrated David Ludwig's support for Windows RT 2014-03-09 11:36:47 -07:00
Ryan C. Gordon
63256a2384 Implemented the Dynamic API magic.
--HG--
extra : rebase_source : 38f639089d3d142895d5cf106919a0bfbb65c5ed
2013-12-09 16:03:18 -05:00
David Ludwig
59df93166d WinRT: merged with SDL 2.0.1 codebase 2013-10-27 21:26:46 -04:00
David Ludwig
88461d442a WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45)
--HG--
rename : README.iOS => README-ios.txt
2013-08-12 22:29:55 -04:00
Ryan C. Gordon
d99a4adff9 SDL_*Parachute() are no-ops, remove them. 2013-08-07 11:12:11 -07:00
Ryan C. Gordon
a03a7f7745 Added filesystem code to Mac and iOS Xcode projects. 2013-08-20 21:29:40 -04:00
Sam Lantinga
6956070880 Added a hint to control the Windows timer resolution: SDL_HINT_TIMER_RESOLUTION
Added an API to watch hint changes: SDL_AddHintCallback(), SDL_DelHintCallback()
You can now dynamically set the joystick background event hint.
2013-07-13 03:13:41 -07:00
Sam Lantinga
bfcb08d569 Implemented an API for thread-local storage: SDL_TLSCreate(), SDL_TLSSet(), SDL_TLSGet() 2013-07-10 02:32:04 -07:00