Commit Graph

567 Commits

Author SHA1 Message Date
Alex Szpakowski
48fea0cee4 macOS: Fix MoltenVK Metal view resizing, and allow the metal view to be used without vulkan. 2017-12-31 15:21:25 -04:00
Sam Lantinga
b92e2f027a Fixed bug 4004 - iOS: don't hide keyboard on RETURN
Dominik Reichardt

As discussed in 2012 the iOS onscreen keyboard hides when you hit RETURN (see https://discourse.libsdl.org/t/on-screen-keyboard-change/19216).
IMO this is a bad idea to not be able to influence this behavior and just recently this was fixed for Android by adding the hint SDL_HINT_ANDROID_RETURN_HIDES_IME in changeset 11768	6ce3bb5e38a5.
2017-12-19 10:57:21 -08:00
Sam Lantinga
0597bf6e99 Fixed bug 3993 - altivec.h include in SDL_cpuinfo.h breaks compilation with -std=c++11
bastien.bouclet

According to this GCC bug report, altivec.h requires building with the gnu extensions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78263.

As an application developer, I don't want SDL to force me to enable the gnu extensions.
2017-12-12 16:25:43 -08:00
Sam Lantinga
2afc0b7fa5 Add the ability to set SDL to handle Return as 'hide IME' on Android softkeyboard. (thanks Rachel!) 2017-12-12 12:52:23 -08:00
Sam Lantinga
e8bbbb37f1 Added support for Android video textures 2017-12-12 12:52:17 -08:00
Sam Lantinga
f1ec8a5f4c Check for immintrin.h before using it in SDL_cpuinfo.h 2017-12-11 12:00:12 -08:00
Sam Lantinga
baae74c857 Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on (thanks Daniel Knobe!) 2017-12-10 09:10:02 -08:00
Ryan C. Gordon
dbce1341d5 audio: fixed typo in Doxygen comment. 2017-12-09 03:24:01 -05:00
Ryan C. Gordon
7cb8b50ad8 hints: Add "metal" to the list of SDL_RENDER_DRIVER hints. 2017-12-08 17:43:57 -05:00
Sam Lantinga
cf3d450313 Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() 2017-12-08 14:30:10 -08:00
Sam Lantinga
ba9c336e04 Fixed building for simulators or older iOS SDKs 2017-12-07 17:47:01 -08:00
Sam Lantinga
6deb1e7595 Fixed compiling Metal renderer on iOS 2017-12-07 17:12:03 -08:00
Ryan C. Gordon
2a2c8d42ca Initial shot at a renderer target for Apple's Metal API.
This isn't complete, but is enough to run testsprite2. It's currently
Mac-only; with a little work to figure out how to properly glue in a Metal
layer to a UIView, this will likely work on iOS, too.

This is only wired up to the configure script right now, and disabled by
default. CMake and Xcode still need their bits filled in as appropriate.
2016-04-21 03:16:44 -04:00
Ryan C. Gordon
351d6d4784 audio: Port WASAPI to WinRT, remove XAudio2 backend.
XAudio2 doesn't have capture support, so WASAPI was to replace it; the holdout
was WinRT, which still needed it as its primary audio target until the WASAPI
code code be made to work.

The support matrix now looks like:

WinXP: directsound by default, winmm as a fallback for buggy drivers.
Vista+: WASAPI (directsound and winmm as fallbacks for debugging).
WinRT: WASAPI
2017-12-06 12:24:32 -05:00
Ryan C. Gordon
083fe066d5 winrt: Patched to compile on Ryan's workstation. :)
I'm not sure why I needed this, but it appears to fix the build on VS2015 here.
2017-12-06 13:48:51 -05:00
Sam Lantinga
57ebc72714 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
14452e9550 Fixed typos (thanks Martin!) 2017-12-04 20:21:52 -08:00
Sam Lantinga
88e3562ba0 Use the included Khronos headers on Android so we can create Core OpenGL contexts when building with older SDK 2017-11-27 15:07:07 -08:00
Sam Lantinga
dba9979f44 Added support for aarch64 memory barrier instruction 2017-11-19 23:36:54 -08:00
Sam Lantinga
a6a4e27ae8 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
846d008036 Only include Intel intrinsics header on x86 and x64 2017-11-11 16:20:00 -08:00
Sam Lantinga
4026db8c7e Replaced the intrinsics header with the single header that includes all intrinsics so we can use AVX, etc. 2017-11-10 14:22:21 -08:00
Brandon Schaefer
9f4e4be8e0 Fixed bug 3943 - General SDL_HINT_VIDEO_DOUBLE_BUFFER hint support 2017-11-07 09:10:32 -08:00
Sam Lantinga
2c5724ef5d Updated version to 2.0.8 since SDL_image depends on it 2017-11-04 21:58:48 -07:00
Sam Lantinga
afbba1822c Fixed compiling on Windows with HAVE_LIBC enabled 2017-11-04 18:01:03 -07:00
Sam Lantinga
bcdf8b916b Added SDL_fmod() and SDL_fmodf() 2017-11-04 17:35:03 -07:00
Sam Lantinga
34502143d9 Added float versions of SDL's math functions 2017-11-04 15:34:14 -07:00
Sam Lantinga
bba90a6562 Fixed using libunwind on iOS, where it's only available on the simulator (thanks Vit!) 2017-11-04 09:44:29 -07:00
Sam Lantinga
7abef33c5b Android configure-based build fixes (thanks Vit!) 2017-11-04 09:00:40 -07:00
Sam Lantinga
54a0245b70 Fixed bug 3926 - SDL_main export
e_pluschauskas

I noticed that after updating SDL to 2.0.6 my application now exports SDL_main.

At GitHub SDL mirror (branch 2.0.5) SDL_main prototyped as
extern C_LINKAGE int SDL_main(int argc, char *argv[]);
but at branch 2.0.6 prototype is
extern C_LINKAGE DECLSPEC int SDL_main(int argc, char *argv[]);
2017-11-01 17:41:25 -07:00
Brandon Schaefer
2ac567b715 Fixed bug 3902 - Add a specific KMSDRM hint for low latency video 2017-10-26 16:37:20 -07:00
Sam Lantinga
fe2b5fec61 Document the SDL audio channel mapping 2017-10-20 14:48:10 -07:00
Sam Lantinga
7a6cf53aea Added SDL_AudioStreamFlush() to the list of new audio stream functions 2017-10-20 10:45:38 -07:00
Ryan C. Gordon
729329068b audio: Added SDL_AudioStreamFlush(). 2017-10-19 18:05:42 -04:00
Sam Lantinga
80f8464d97 Added audio stream conversion functions:
SDL_NewAudioStream
    SDL_AudioStreamPut
    SDL_AudioStreamGet
    SDL_AudioStreamAvailable
    SDL_AudioStreamClear
    SDL_FreeAudioStream
2017-10-18 15:54:05 -07:00
Sam Lantinga
a225ffc1d7 Added min/max macros for the sized SDL datatypes 2017-10-16 14:39:56 -07:00
Sam Lantinga
fc60db86b3 Fixed compiler warning 2017-10-12 17:17:09 -07:00
Sam Lantinga
4b28429882 Android doesn't have libunwind.h in API 16 2017-10-12 14:21:21 -07:00
Sam Lantinga
9c580e14c9 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
0ce23a5498 Updated version to 2.0.7 2017-10-12 08:08:04 -07:00
Sam Lantinga
d90fce3c9e Exposed the joystick locking functions for multi-threaded access to the joystick API 2017-10-10 11:10:15 -07:00
Brandon Schaefer
e564da78b7 revert files I didnt mean to commit! 2017-09-29 10:15:44 -07:00
Brandon Schaefer
e27f12e0da wayland: Fix bug 3814 -Wmissing-field-initializers 2017-09-29 10:07:37 -07:00
Sam Lantinga
c44e741bd9 Fixed bug 3842 - fix SDL_thread.h for emx
Ozkan Sezer

EMX declares _beginthread() / _endthread() in stdlib.h, not process.h.
The attached patch updates the OS/2 case of SDL_thread.h for it.  (It
also tidies the unreadable whitespace in win32 case.)
2017-09-23 12:38:47 -07:00
Alex Szpakowski
80f9e2f199 iOS: Fix compiling using the iOS 7 SDK, partially broken since MoltenVK support was added.
Note that apps submitted to the iOS App Store *must* use a modern iOS SDK (currently iOS 10 is probably the minimum), however the SDK used to build is separate from the minimum iOS version an app supports at runtime.
2017-09-21 20:11:44 -03:00
Sam Lantinga
c08a7a74a5 Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category,
determining whether the phone mute switch affects the audio
2017-09-15 17:27:32 -07:00
Sam Lantinga
16b8c4ea43 Fixed bug 3811 - change HAVE_COPYSIGN to HAVE__COPYSIGN in SDL_config_windows.h
Ozkan Sezer

The patch below changes HAVE_COPYSIGN macro in SDL_config_windows.h to
HAVE__COPYSIGN, so that _copysign() can be used in SDL_stdlib.h which
is available in many more windows-targeting toolchains such as MinGW,
MSVC >= 6, etc, and not just  MSVC >= 2013. SDL_stdlib.c already has a
specific check for HAVE__COPYSIGN, so I believe this is reasonable.
2017-09-10 10:30:25 -07:00
Sam Lantinga
be1caece4a Correction: copysign has been supported by windows several toolchains
for a very long time, including MSVC6, MinGW, LCC-Win32, (no released
watcom versions though, but that's of no concern.)

Patch from Ozkan Sezer
2017-09-10 09:19:10 -07:00
Sam Lantinga
569c222ca8 Updated documentation so it's clear you should use SDL_SetWindowDisplayMode() to change the size of fullscreen windows. 2017-09-09 11:04:35 -07:00
Sam Lantinga
f465f24d73 Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits
Simon Hug

When RWops seeks with fseek or fseeko it uses the types long or off_t which can be 32 bits on some platforms. stdio_seek does not check if the 64-bit integer for the offset fits into a 32-bit integer. Offsets equal or larger than 2 GiB will have implementation-defined behavior and failure states would be very confusing to debug.

The attached patch adds range checking by using the macros from limits.h for long type and some bit shifting for off_t because POSIX couldn't be bothered to specify min and max macros.

It also defines HAVE_FSEEKI64 in SDL_config_windows.h so that the Windows function gets picked up automatically with the default config.

And there's an additional error message for when ftell fails.
2017-09-09 08:36:37 -07:00