Commit graph

175 commits

Author SHA1 Message Date
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
09860178dc ran 'chmod -x' on two files 2018-06-30 20:03:23 +03:00
Ozkan Sezer
53e38a8dfc ran 'chmod -x' on many files 2018-06-12 14:00:15 +03:00
Sam Lantinga
45d40a3639 Fixed bug 4088 - Fix Metal link errors with test programs in SDLTest.xcodeproj
Eric Wasylishen

The following patch adds Metal.framework to the "link binary with libraries" section of each test program, with "status" set to "optional", which fixes link errors on all of the test programs. I'm not sure if this is a correct fix - the fact that this was necessary might indicate the static SDL2.a library has a hard dependency on Metal.framework (?) - but it gets the test programs working in Xcode again.

It also adds testyuv_cvt.c to the testoverlay2 target, fixing a link error.
2018-02-20 09:04:31 -08:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Ryan C. Gordon
e4884ccd2e xcode: Add Metal and QuartCore to everything as a weak_framework.
--HG--
extra : amend_source : 351d631ed41aae1f7a0ff8f8875958abf9b99808
2017-12-30 14:40:39 -05:00
Sam Lantinga
9167983c42 Enable building the Metal renderer by default, and weak link the Metal framework so the SDL library is safe to use on older Macs
Also generate iOS versions of the Metal shaders
2017-12-07 16:08:09 -08:00
Sam Lantinga
34553b8de0 Fixed bug 3975 - Add GLES2 support for macOS via ANGLE library
Andrey

Seems latest google angle library successfully built & tested under macOS'es.

https://github.com/google/angle

We need to use GLES2 to implement true cross-platform code.
2017-12-04 20:35:01 -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
a429dc96f9 Updated version to 2.0.8 since SDL_image depends on it 2017-11-04 21:58:48 -07:00
Sam Lantinga
c78d61d079 Build both 32 and 64-bit architectures in the OSX Framework 2017-10-12 17:21:57 -07:00
Sam Lantinga
4d7a2db434 Added functions to query and set the SDL memory allocation functions:
SDL_GetMemoryFunctions()
    SDL_SetMemoryFunctions()
    SDL_GetNumAllocations()
2017-10-12 13:44:28 -07:00
Sam Lantinga
3ca107edbd Updated version to 2.0.7 2017-10-12 08:08:04 -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
Sam Lantinga
da81885d77 Added SDL_vulkan.h to the Mac OS X framework headers 2017-09-04 22:51:28 -07:00
Sam Lantinga
a30aa1778d Removed Metal and QuartzCore frameworks which aren't needed for Vulkan support 2017-08-29 01:04:48 -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
Sam Lantinga
d345de0831 Updated version to 2.0.6 2017-08-18 18:16:37 -07:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08: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
Sam Lantinga
e7598eccec Build SDL as universal binary 2016-10-12 18:46:17 -07:00
Sam Lantinga
79485875b5 Updated version to 2.0.5 in preparation for release 2016-09-28 22:24:01 -07:00
Ryan C. Gordon
0378b1263e Xcode/mac: fix building standalone static and shared libraries. 2016-09-18 18:19:32 -04:00
Sam Lantinga
d2cb290156 Recommended settings from Xcode 7.3.0 2016-09-16 22:28:12 -07:00
Sam Lantinga
8d2e2aad1d Fixed set of libraries needed to build on Mac OS X 2016-09-15 08:57:56 -07: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
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
e2f5a3023a Removed Mac OS 10.5 support (bug #3137). Also fixed a warning about deprecated Carbon code when using SDL_audio (bug #3127, thanks Dominik!) 2016-05-21 00:20:52 -03:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Sam Lantinga
f15df00856 Sign any subframeworks - not needed for SDL proper, but included for consistency with other projects 2015-05-23 09:33:20 -07:00
Sam Lantinga
2dc85e7ed4 Moved code signature step to after the framework build step is complete, and don't hardcode the codesign identity 2015-04-26 20:46:07 -07:00
Sam Lantinga
168076ba13 Turn off code signing by default
Code signature can be added after build with the following command line:
codesign --force --sign 76BB5ACAC44CA5EFA5F879434D157B81DA842CFB SDL2.framework/Versions/A
2015-04-26 20:21:06 -07:00
Sam Lantinga
7a341245a5 Updated project and added code signing for release builds 2015-04-26 15:47:40 -07:00
Edward Rudd
66c1317cb8 add controllermap program to SDLTest xcode project
--HG--
extra : rebase_source : a43ce7f2103c9b49c79081f4f07a5edf28b1ba35
2014-11-23 15:21:49 -05:00
Sam Lantinga
98e9c13a13 Updated version to 2.0.4 2014-09-02 06:55:47 -07:00
Sam Lantinga
46e3d957ab Fixed bug 2696 - Mac: fix display mode refresh rate calculation
Alex Szpakowski

SDL's Cocoa backend uses the CGDisplayMode API to get refresh rate information about a display mode, but CGDisplayModeGetRefreshRate will return 0 on most non-CRT monitors.

The only way I know of to get correct refresh rate information in OS X is via the CoreVideo DisplayLink API.
I have attached a patch which tries to use the CVDisplayLinkGetNominalOutputVideoRefreshPeriod function if CGDisplayModeGetRefreshRate fails, which fixes display mode refresh rate information on the monitors I tested.

The CVDisplayLink API requires linking with the CoreVideo framework, and the patch updates the various build files to do so.
2014-08-23 10:47:50 -07:00
Sam Lantinga
61b34b6728 Strip the binaries before signing them, in release configuration 2014-07-08 00:23:36 -07:00
Sam Lantinga
3cf1187208 Fixed supporting multiple frameworks 2014-07-07 23:48:21 -07:00
Sam Lantinga
37789c74f0 Fixed code signing release frameworks 2014-07-07 23:40:10 -07:00
Sam Lantinga
c03ba02837 Added OpenGL ES headers to public headers 2014-06-21 11:42:46 -07:00
Ryan C. Gordon
663450efc3 Don't link directly against OpenGL.framework on Mac OS X.
We dlopen() it as appropriate already.
2014-06-05 11:04:07 -04:00
Sam Lantinga
fbe8cee457 Fixed bug 2489 - SDL2.framework references __Block_copy in /usr/lib/libSystem.B.dylib, but this symbol cannot be found on OSX-10.5
Thomas Schatz

The dynamic library (extracted from SDL2-2.0.3.dmg and put in /Library/Frameworks/) references the __Block_copy symbol in /usr/lib/libSystem.B.dylib, which cannot be found:

dlopen(/Library/Frameworks/SDL2.framework/SDL2, 6): Symbol not found: __Block_copy
  Referenced from: /Library/Frameworks/SDL2.framework/SDL2
  Expected in: /usr/lib/libSystem.B.dylib

From what I could gather __Block_copy seems to be related to the blocks extension to the C programming language introduced by Apple since OSX-10.6 (see: http://thirdcog.eu/pwcblocks/). If this is indeed the case, I don't think the SDL2-2.0.3.dmg on the website is at all compatible with OSX-10.5 countrary to what is announced.
2014-04-17 22:23:32 -07:00
Sam Lantinga
90cc00f217 Updated framework version to match dylib version.
Actually the dylib compatibility version is 3.0.0, but don't break compatibility with previous frameworks, which were compatibility version 1.0.0
2014-03-12 07:55:32 -07:00
Sam Lantinga
b821f84418 Updated SDL to version 2.0.3 2014-03-09 10:38:30 -07:00
Sam Lantinga
e49f7fcdf8 Updated SDL to version 2.0.2 2014-02-09 03:09:56 -08:00
Edward Rudd
4325bf478a add testdropfile to OS X Project
--HG--
extra : rebase_source : 117218f4581fb34babfa059a70a75e73ffd0c933
2014-02-04 18:21:39 -05:00
Edward Rudd
00970c2034 Implement new backend methods for haptic and hot plugging on OS X 2014-02-04 18:17:16 -05:00