Commit graph

10645 commits

Author SHA1 Message Date
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
860acadf69 Removed spurious debug output 2017-12-04 20:26:09 -08:00
Olli Kallioinen
aea84272a5 Fixed SDL_Log not working on windows if the output is being redirected. 2017-12-04 19:28:03 +02:00
Sam Lantinga
a5b3e11d5c Fixed typos (thanks Martin!) 2017-12-04 20:21:52 -08:00
Sam Lantinga
de2314ec6b Fixed name of eglCreatePbufferSurface function 2017-12-03 20:27:08 -08:00
Sam Lantinga
cabb4b1035 Fixed bug 3945 - Add eglCreatePbufferSurface function
tomwardio

Proposed patch loads eglCreatePbufferSurface in same manner as other 1.1 functors. This allows custom video drivers to create pbuffer surfaces.
2017-12-03 20:25:55 -08:00
Sam Lantinga
abea243f22 Non-resizable windows need to have their window rect set to the client rect 2017-11-28 18:31:18 -08:00
Sam Lantinga
21571e1012 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
2f30c13333 Fixed bug 3980 - Fix for KMSDRM driver where cursor would not be shown on some gfx hardware because of unsupported cursor size
Manuel Alfayate Corchete

This fixes a problem with KMSDRM on some graphics hardware where only bigger cursor sizes are supported, such as current Intel gfx. (The kernel-side driver is what limits this: had to look for failing IOCTLs...)
That caused SDL_SetCursor() to fail silently, and we were left with a missing cursor without further explanation.
With this patch, different "standard" sizes are tried and a bigger one is used (with an intermediate and clean buffer only used to write the new cursor to the BO where it will live after) if we get, let's say, 16x16 which is pretty common but our hardware does not support that.
2017-11-24 12:03:28 -08:00
Sam Lantinga
bc8014e1db Fixed bug 3979 - Failed to link with "multiple definition of `scalbln'" error on both MinGW and MinGW-w64 by CMake
Vitaly Novichkov

Once I ran build of my codecs collection on AppVeyor where my CMake script downloads latest SDL2 from HG repo, failed to link because of math functions conflict:

https://ci.appveyor.com/project/Wohlstand/audiocodecs/build/1.0.44
The revision is b94292eebb5c

There are both vanilla MinGW and MinGW-w64 are failed to build.


```
[100%] Linking C shared library libSDL2.dll
c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../libmingwex.a(scalbn.o):(.text+0x0): multiple definition of `scalbln'
CMakeFiles\SDL2.dir/objects.a(s_scalbn.c.obj):C:/projects/audiocodecs/build-MinGW-Release-Win32/external/SDL2/src/SDL2HG/src/libm/s_scalbn.c:30: first defined here
2017-11-24 03:01:07 -08:00
Sam Lantinga
91e062fe69 Fixed some compiler warnings 2017-11-21 21:58:27 -08:00
Sam Lantinga
015f8c9c6b Disabled spurious Visual Studio warnings in the uClibc math code 2017-11-21 21:51:33 -08:00
Sam Lantinga
f2913ce773 Fixed bug 3976 - SDL drivers may leak driverdata memory due to ignoring return value of SDL_AddDisplayMode
C Snover

SDL_AddDisplayMode returns an SDL_bool corresponding to whether or not the given display mode was added or not. It will return SDL_FALSE if a matching display mode already exists in the display's list of display modes, which causes ownership of the mode driverdata to remain with the caller. Some video drivers ignore the return value of SDL_AddDisplayMode, so leak the driverdata memory when SDL_AddDisplayMode returns SDL_FALSE.
2017-11-21 21:30:47 -08:00
Ethan Lee
17a6f8ce62 Steam Virtual GamePad config for macOS 2017-11-20 13:59:43 -05:00
Sam Lantinga
4aa163b5d1 Fixed bug 3973 - Include of stdint is needed to build on linux, mingw and possibly android
Stuart Axon

https://discourse.libsdl.org/t/stdint-h-removed/23426

https://discourse.libsdl.org/t/debuild-fails-to-build-the-last-few-days/23429/4

Currently SDL2 is not building in Linux (x86 and ARM), Android and MingW because include stdint.h has been removed from yuv_rgb.h
2017-11-20 00:06:37 -08:00
Sam Lantinga
2dd806061a Fixed bug 3959 - cmake build broken by commit 11702 (cf166abbde4a) due to typo
Mate Nagy
There is a typo in CMakeLists.txt that makes CMake exit with failure.

Change that causes the problem: (Notice the double ending brackets)
   ${SDL2_SOURCE_DIR}/src/video/*.c)
+  ${SDL2_SOURCE_DIR}/src/video/yuv2rgb/*.c)

Fix:
Just remove the first ending bracket resulting in:
   ${SDL2_SOURCE_DIR}/src/video/*.c
   ${SDL2_SOURCE_DIR}/src/video/yuv2rgb/*.c)
2017-11-20 00:03:23 -08:00
Sam Lantinga
e877c092e2 Added support for aarch64 memory barrier instruction 2017-11-19 23:36:54 -08:00
Sam Lantinga
56baad432a Fixed bug 3964 - YUV to RGB in video/SDL_yuv.c is broken for any output format of type ABGR8888 or BGR888
raist66676

Here is the bug in latest SDL 2.0.8 development repo. It is obvious and simple to fix by correcting typos on six lines of code.

In src/video/SDL_yuv.c on lines 217, 249, 280, 321, 353, and 384 the wrong conversion functions are called for SDL_PIXELFORMAT_ABGR8888 and SDL_PIXELFORMAT_BGR888. Instead of ABGR functions, BGRA functions are called. These are typos.
2017-11-17 11:03:02 -08:00
Sam Lantinga
efc870f380 Fixed building yuv_rgb.h when stdint.h isn't available (thanks Ozkan!) 2017-11-17 10:55:58 -08:00
Sam Lantinga
72dec56391 Fixed building YUV test programs (thanks Ozkan!) 2017-11-17 10:54:46 -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
e7cc03e0bd Fixed Android build error on older SDK 2017-11-12 10:59:05 -08:00
Sam Lantinga
852e3a33bf Fixed typo in comment 2017-11-11 17:21:47 -08:00
Sam Lantinga
5d91301861 Only include Intel intrinsics header on x86 and x64 2017-11-11 16:20:00 -08:00
Sam Lantinga
2f2d79f342 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
Alex Szpakowski
cf6ed4a80c macOS: Fix an OS-generated warning printed to stdout on launch in bundled apps. 2017-11-09 22:24:09 -04:00
Sam Lantinga
43dc92f4e5 Back out the following commits which are causing Dota 2 Exclusive Fullscreen to fail on AMD-based Macs. The details of why this is being reverted are at: https://bugzilla.libsdl.org/show_bug.cgi?id=3949
Alex Szpakowski <slime73@gmail.com> 2017-07-12 21:28 -0300
macOS: Expose more display modes on retina screens. Fixes an issue found in BZFlag.
http://hg.libsdl.org/SDL/rev/1e26564c7288

Alex Szpakowski <slime73@gmail.com> 2017-07-12 21:32 -0300
Fix a potential crash in macOS 10.7 and earlier.
http://hg.libsdl.org/SDL/rev/424607440631
2017-11-08 14:17:23 -08:00
Brandon Schaefer
782af21dfb Fixed bug 3943 - General SDL_HINT_VIDEO_DOUBLE_BUFFER hint support 2017-11-07 09:10:32 -08:00
Ryan C. Gordon
4541e18c18 mouse: remove assert for unimplemented platforms (thanks, tomwardio!).
Fixes Bugzilla #3946.
2017-11-06 15:29:24 -05:00
Sam Lantinga
7fe2341284 Updated version to 2.0.8 since SDL_image depends on it 2017-11-05 01:17:24 -07:00
Sam Lantinga
384ce769bd Fixed bug 3939 - Remove static vm_error and vm_event from SDL_x11modes.c
tomwardio

Remove static int vm_error and vm_event, use local variables instead.

This fixes unused variable errors when compiling with SDL_VIDEO_DRIVER_X11_XINERAMA undefined.

src/video/x11/SDL_x11modes.c:505:22: error: unused variable 'vm_error' [-Werror,-Wunused-variable]

src/video/x11/SDL_x11modes.c:505:12: error: unused variable 'vm_event' [-Werror,-Wunused-variable]
2017-11-04 22:06:40 -07:00
Sam Lantinga
e6cbe60b10 Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable
Sylvain

What about getting some return code instead of creating another native function.
2017-11-04 22:03:28 -07: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
7190c9d143 Fixed compiling on Windows with HAVE_LIBC enabled 2017-11-04 18:01:03 -07:00
Sam Lantinga
5df8da777c Fixed compiler warnings after uClibc code update 2017-11-04 17:39:28 -07:00
Sam Lantinga
4e9aab5884 Added SDL_fmod() and SDL_fmodf() 2017-11-04 17:35:03 -07:00
Sam Lantinga
fd9bdc8766 Updated math code from the uClibc 0.9.33 release 2017-11-04 15:53:19 -07:00
Sam Lantinga
554d129015 Added float versions of SDL's math functions 2017-11-04 15:34:14 -07:00
Sam Lantinga
96f6650fb6 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
0d583faae9 Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable
We're going to push the manifest environment variables from the Java side instead of continually querying for them from the native side.
2017-11-04 09:37:29 -07:00
Sam Lantinga
bd363eb4e7 Fixed bug 3940 - Add support for EGL_SURFACE_TYPE
tomwardio

Add support to be able to set EGL_SURFACE_TYPE bits when creating an EGL config. This is usefule when wanting to create pixel buffer surfaces in custom video drivers.
2017-11-04 09:07:33 -07:00
Conn O'Griofa
5d4383cc0b Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver
* The brcmGLESv2 vendor library also supports ES PVR/1 profiles
* Fallback to standard Mesa libraries if the VC4 driver is loaded
2017-11-04 09:04:19 -07:00
Conn O'Griofa
e33c3c0757 SDL_video: try to bootstrap KMSDRM before RPI video driver
Allow better coexistence between RPI's vendor libraries and VC4 mesa driver.
2017-11-04 09:03:20 -07:00
Sam Lantinga
2c6a874cc6 Android configure-based build fixes (thanks Vit!) 2017-11-04 09:00:40 -07:00
Johannes Bader
f607a8a0b8 Emscripten: use cursor hotspot
the cursor's hotspot simply wasn't translated to it's CSS equivalent, yet
see https://developer.mozilla.org/en-US/docs/Web/CSS/cursor?v=example#Syntax. no explicit hotspot if (0|0) for compatibility with Edge and IE, which indeed don't support custom hot spots
2017-11-04 11:16:49 +00:00
Sam Lantinga
904d01eba5 Make SDL fullscreen windows on Android actually fullscreen 2017-11-02 10:41:55 -07:00
Sam Lantinga
8dc14c58d8 Fixed bug 3935 - Not find joysticks if android run 24-48 days.
Alexander Orefkov

In src\joystick\android\SDL_sysjoystick.c in SDL_SYS_JoystickDetect when SDL_GetTicks return number grater 2147483648 (after 24.85 days uptime) SDL_TICKS_PASSED(SDL_GetTicks(), timeout) return FALSE and Android_JNI_PollInputDevices is never calling.
And in JoystickByDeviceId - when search for newly added joystic - after SDL_SYS_JoystickDetect item not reinitilized, and always stay NULL, cause return NULL instead of added joystick.
2017-11-02 08:48:14 -07:00
Sam Lantinga
9b9c3303cd Fixed bug 3933 - Android, no need of the listener thread
Sylvain

A listener thread has been added to know when the native thread would end.
But now, it is more easy to only check that after the main function has returned. It's one thread less.
2017-11-02 08:46:14 -07:00
Sam Lantinga
bbee4d9fff Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable
Sylvain

Some issue with this commit:
https://hg.libsdl.org/SDL/rev/4130b92b6be4

There is a memory allocation missing.
2017-11-01 19:19:21 -07:00
Sam Lantinga
b19a91d82d Allow the activity to persist through connecting or disconnecting a keyboard 2017-11-01 18:41:11 -07:00