Log

Author Commit Date CI Message
Sam Lantinga a6a4e27a 2017-11-12T22:51:12 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.
Sam Lantinga c317ab97 2017-11-12T10:59:05 Fixed Android build error on older SDK
Sam Lantinga 20364769 2017-11-11T17:21:47 Fixed typo in comment
Sam Lantinga 846d0080 2017-11-11T16:20:00 Only include Intel intrinsics header on x86 and x64
Sam Lantinga 4026db8c 2017-11-10T14:22:21 Replaced the intrinsics header with the single header that includes all intrinsics so we can use AVX, etc.
Alex Szpakowski 5501bcc8 2017-11-09T22:24:09 macOS: Fix an OS-generated warning printed to stdout on launch in bundled apps.
Sam Lantinga fcb77f98 2017-11-08T14:17:23 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/cfb3ddf796c3 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/4941c8867075
Brandon Schaefer 9f4e4be8 2017-11-07T09:10:32 Fixed bug 3943 - General SDL_HINT_VIDEO_DOUBLE_BUFFER hint support
Ryan C. Gordon 5cc46f3d 2017-11-06T15:29:24 mouse: remove assert for unimplemented platforms (thanks, tomwardio!). Fixes Bugzilla #3946.
Sam Lantinga bbb22a75 2017-11-05T01:17:24 Updated version to 2.0.8 since SDL_image depends on it
Sam Lantinga c5429bd9 2017-11-04T22:06:40 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]
Sam Lantinga 50e422ad 2017-11-04T22:03:28 Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable Sylvain What about getting some return code instead of creating another native function.
Sam Lantinga 2c5724ef 2017-11-04T21:58:48 Updated version to 2.0.8 since SDL_image depends on it
Sam Lantinga afbba182 2017-11-04T18:01:03 Fixed compiling on Windows with HAVE_LIBC enabled
Sam Lantinga 34a8cf76 2017-11-04T17:39:28 Fixed compiler warnings after uClibc code update
Sam Lantinga bcdf8b91 2017-11-04T17:35:03 Added SDL_fmod() and SDL_fmodf()
Sam Lantinga 6cf06575 2017-11-04T15:53:19 Updated math code from the uClibc 0.9.33 release
Sam Lantinga 34502143 2017-11-04T15:34:14 Added float versions of SDL's math functions
Sam Lantinga bba90a65 2017-11-04T09:44:29 Fixed using libunwind on iOS, where it's only available on the simulator (thanks Vit!)
Sam Lantinga 758156a7 2017-11-04T09:37:29 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.
Sam Lantinga 7334a2a1 2017-11-04T09:07:33 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.
Conn O'Griofa bf3e363d 2017-11-04T09:04:19 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
Conn O'Griofa 547448df 2017-11-04T09:03:20 SDL_video: try to bootstrap KMSDRM before RPI video driver Allow better coexistence between RPI's vendor libraries and VC4 mesa driver.
Sam Lantinga 7abef33c 2017-11-04T09:00:40 Android configure-based build fixes (thanks Vit!)
Johannes Bader 17243133 2017-11-04T11:16:49 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
Sam Lantinga bb8c3a9c 2017-11-02T10:41:55 Make SDL fullscreen windows on Android actually fullscreen
Sam Lantinga c954b538 2017-11-02T08:48:14 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.
Sam Lantinga 522901b8 2017-11-02T08:46:14 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.
Sam Lantinga 1475e698 2017-11-01T19:19:21 Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable Sylvain Some issue with this commit: https://hg.libsdl.org/SDL/rev/97387a8b88d3 There is a memory allocation missing.
Sam Lantinga 8c465802 2017-11-01T18:41:11 Allow the activity to persist through connecting or disconnecting a keyboard
Sam Lantinga 62c3acaf 2017-11-01T18:40:11 Moved the meta-data into the right section
Sam Lantinga 54a0245b 2017-11-01T17:41:25 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[]);
Sam Lantinga 9192c93e 2017-11-01T17:30:02 Fixed bug 3932 - Android, GetDisplayDPI release local reference Sylvain When writing JNI code, one has to make sure all local references are released otherwise the app end up crashing.
Sam Lantinga a7d2d12c 2017-11-01T10:07:04 Fixed building on non-Android platforms
Sam Lantinga a90be440 2017-11-01T10:06:58 Added controller mapping for Android TV remotes Also fixed the back button on the remote exiting the application
Sam Lantinga 4478707b 2017-10-31T13:49:59 Add SDL_GetDisplayDPI implementation on Android. (thanks Rachel!)
Sam Lantinga 6d23ea4b 2017-10-29T21:09:09 Fixed Java string comparison with ""
Sam Lantinga fa5db3a9 2017-10-28T12:11:25 Added the old ant Android build project structure
Brandon Schaefer 2ac567b7 2017-10-26T16:37:20 Fixed bug 3902 - Add a specific KMSDRM hint for low latency video
Sam Lantinga f24c6672 2017-10-26T10:49:33 Updated SDL iOS project for tvOS
Sam Lantinga 213b2490 2017-10-26T10:42:14 Added missing keyinfotable.h
Sam Lantinga 8e37bed3 2017-10-26T10:41:38 android: Fix softkeyboard issue in SDL on Android.
Ryan C. Gordon 9bbf92e3 2017-10-25T18:02:11 cocoa: Don't change the NSWindow background color. Changing the background color causes the titlebar to blend against it on modern macOS releases, making all SDL windows look wrong by default. This was set to make the window not flash white before a GL context is ready, but we can accomplish this in our window's view's drawRect implementation, too.
David Ludwig 0e032d58 2017-10-24T13:21:11 WinRT: Move Windows::Foundation::Initialize to SDL2.dll, from SDL_main. This allows C# UWP applications to use SDL2's SDL_WinRTRunApp function. Kudos to Ethan Lee (flibitijibibo@flibitijibibo.com) for the patch. Thanks!
Sam Lantinga 8fd0c22a 2017-10-24T00:17:07 Added the ability to set SDL hints from AndroidManifest.xml (thanks Rachel!) This is especially useful for things like the accelerometer hint which could be needed before application main().
Sam Lantinga 45536710 2017-10-24T00:04:40 Fixed crash if mSurface isn't set up when we pause the application
Sam Lantinga 81f7e0c1 2017-10-23T23:35:04 Removed unneeded file automatically generated by Android Studio
Sam Lantinga b8d8a1f1 2017-10-23T23:26:40 Updated the minimum and target SDK versions in AndroidManifest.xml
Sam Lantinga edf0fae1 2017-10-23T23:23:47 Updated Android build tools version, which bumped minimum deployment target to API 14 Also added native code to the Android gradle project, which allows using gradle or Android Studio to build the entire SDL application without a separate ndk-build step.
Sam Lantinga 76cdce44 2017-10-23T23:23:34 Fixed build with older Android SDK
Sam Lantinga f08480af 2017-10-23T15:23:43 Switched to new style gradle Android application build process
Sam Lantinga 862da6ff 2017-10-23T12:33:18 Added tag release-2.0.7 for changeset f69c9f74a857
Sven Hesse b89cac67 2017-10-22T20:24:58 Don't X error in SDL_CreateWindow with unsupported GL attributes
Sam Lantinga adc64f92 2017-10-21T22:26:24 Added Visual Studio solution files for WinRT projects
Sam Lantinga 10376eb9 2017-10-21T04:20:57 Fixed bug 3901 - Fix vsync-ed pageflips on the KMSDRM video driver Manuel I noticed that, at least on Intel GPU hardware, passing SDL_RENDERER_PRESENTVSYNC would result on a static console instead of the program graphics. That was due to the fact that calling drmModePageFlip() only works if we have previously set up CRTC to one of the GBM buffers with a drmModeSetCrtc() call, so now it's done and things work as expected. The KMSDRM_GLES_SetupCrtc() call is done only one time, only when needed (when egl_swapinterval is not 0: when it's 0, there's no need for it because we flip by calling drmModePageFlip() anyway). The place where KMSDRM_GLES_SetupCrtc() call is done may look strange, but it's right: it needs EGL completely ready because it needs to call eglSwapBuffers() internally to work (see more comments about it in the code).
Sam Lantinga e830ef34 2017-10-20T16:53:42 Fixed typo converting 4 channel audio to 2 channel
Sam Lantinga 9a291c1e 2017-10-20T14:51:22 Added a note about adjusting channel weights when converting to fewer channels
Sam Lantinga fe2b5fec 2017-10-20T14:48:10 Document the SDL audio channel mapping
Sam Lantinga 7a6cf53a 2017-10-20T10:45:38 Added SDL_AudioStreamFlush() to the list of new audio stream functions
Sam Lantinga c339d9ed 2017-10-20T10:29:22 Reverted changes 6acdea394736 and 1448a2ac30fe I don't want to introduce any regressions with Android TV remote support
Sam Lantinga 2001898d 2017-10-19T15:37:52 Fixed Android joystick detection
Ryan C. Gordon 72932906 2017-10-19T18:05:42 audio: Added SDL_AudioStreamFlush().
Sam Lantinga 9d9be456 2017-10-19T13:54:56 Don't use DPAD devices as joystick input on Android
Ryan C. Gordon e98920f5 2017-10-18T23:49:46 Check correct variable for malloc() results.
Sam Lantinga afefcbfe 2017-10-18T19:30:47 Fixed bug 3876 - Resampling of certain sounds adds heavy distortion Simon Hug Patch that adds [-1, 1] clamping to the scalar audio type conversions. This may come from the SDL_Convert_F32_to_X_Scalar functions. They don't clamp the float value to [-1, 1] and when they cast it to the target integer it may be too large or too small for the type and get truncated, causing horrible noise. The attached patch throws clamping in, but I don't know if that's the preferred way to fix this. For x86 (without SSE) the compiler (I tested MSVC) seems to throw a horrible amount of x87 code in it. It's a bit better with SSE, but probably still quite the performance hit. And SSE2 uses a branchless approach with maxss and minss.
Sam Lantinga 653ab5d9 2017-10-18T19:26:36 Added a staging buffer to the audio stream so that we can accumulate small amounts of data if needed when resampling
Sam Lantinga 80f8464d 2017-10-18T15:54:05 Added audio stream conversion functions: SDL_NewAudioStream SDL_AudioStreamPut SDL_AudioStreamGet SDL_AudioStreamAvailable SDL_AudioStreamClear SDL_FreeAudioStream
Sam Lantinga 9fd0d619 2017-10-18T08:52:04 Fixed bug 3821 - Allow SDL_CreateWindow and SDL_CreateRenderer with OpenGL ES 3.0 (GLES3) for Angle (Windows) Carlos Angle supports GLES3 but when using these functions (SDL_CreateWindow and SDL_CreateRenderer), defaults again to GLES2.0. A current workaround (hack) to retrieve a GLES3.0 context with Angle is: 1) set SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); after InitSDL AND after calling SDL_CreateWindow (before SDL_CreateRenderer) 2) Comment lines 2032-2044 in SDL_render_gles2.c, funtion GLES2_CreateRenderer window_flags = SDL_GetWindowFlags(window); if (!(window_flags & SDL_WINDOW_OPENGL) || profile_mask != SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) { changed_window = SDL_TRUE; SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, RENDERER_CONTEXT_MAJOR); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, RENDERER_CONTEXT_MINOR); if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) { goto error; } } This retrives a GLES3 context as confirmed using glGetString(GL_VERSION). This should be fixed by modifying a few if's.
Sam Lantinga 556a8544 2017-10-16T15:22:40 Fixed compiler warning on iOS
Sam Lantinga e4ef1885 2017-10-16T14:57:42 Fixed bug 3890 - Incomplete fix for CVE-2017-2888 Felix Geyer http://hg.libsdl.org/SDL/rev/a31ee4d64ff6 tries to fix CVE-2017-2888. Unfortunately compilers may optimize the second condition "(size / surface->pitch) != surface->h" away. See https://bugzilla.redhat.com/show_bug.cgi?id=1500623#c2 I've verified that this is also the case on Debian unstable (gcc 7.2).
Sam Lantinga a225ffc1 2017-10-16T14:39:56 Added min/max macros for the sized SDL datatypes
Sam Lantinga 8e98bdaa 2017-10-15T21:21:19 Fixed bug 3883 - SDL_assert / SDL_PromptAssertion in TTY mode does not accept options ("abriA") shoerbaffen fgets can read a newline and SDL_strcmp will never return zero.
Sam Lantinga f658a737 2017-10-15T21:07:01 Fixed bug 3882 - cmake fix for osx Ozkan Sezer In my cross-build environment with cmake-2.8.12.1, cmake does not add SDL_coreaudio.m to its makefiles and the result is a failure. The fix is simple: set the language to C for it as it is done at other places in CMakeLists.txt.
Sam Lantinga dff56c34 2017-10-13T19:55:07 Android Studio code analyzer fixes
Sam Lantinga a223560a 2017-10-13T19:30:34 Fixed bug 3880 - X Error upon quit since rev. 11607 Ozkan Sezer Since changeset 11607:60cd425a2f14, I am getting the following error upon quit. Running testsprite2, clicking the mouse, and quiting it is enough to trigger it. This is on my old Fedora9 x86-Linux: X Error of failed request: BadCursor (invalid Cursor parameter) Major opcode of failed request: 2 (X_ChangeWindowAttributes) Resource id in failed request: 0xb057340 Serial number of failed request: 905 Current serial number in output stream: 906 Reverting https://hg.libsdl.org/SDL/rev/60cd425a2f14 removes the error.
Sam Lantinga cf923648 2017-10-13T09:50:04 Fixed bug 3879 - add missing SDLCALL to SDLTest_TrackedMalloc & co. Ozkan Sezer The attached trivial patch adds missing SDLCALL to SDLTest_TrackedMalloc & co.
Ryan C. Gordon fa156741 2017-10-13T01:15:29 coreaudio: changed device close procedure to prevent long hangs in some cases. The audioqueue thread needs to keep running, and processing the CFRunLoop until the AudioQueue is disposed of, otherwise CoreAudio will hang waiting for final data to feed the device. At least, I think this is how it all works. It definitely fixes the bug here! Since AudioQueueDispose() calls AudioQueueStop() internally, there's no need for our thread to handle this, either, which is good because the AudioQueue would be disposed by this point. So now the AudioQueue is disposed first, and then our thread is joined, and everything works out okay. Just in case, we mark the device "paused" before setting everything in motion, so any further callbacks from CoreAudio will write silence and not fire the app's audio callback again. Fixes Bugzilla #3868.
Sam Lantinga 0506d4fc 2017-10-12T17:21:57 Build both 32 and 64-bit architectures in the OSX Framework
Sam Lantinga fc60db86 2017-10-12T17:17:09 Fixed compiler warning
Sam Lantinga 22b6df51 2017-10-12T14:46:28 Use the lower-case hex output to match other stack trace printouts
Sam Lantinga 70791956 2017-10-12T14:44:54 Fixed compiler warning
Sam Lantinga 5fc20176 2017-10-12T14:25:07 Fixed bug 3877 - missing SDLCALL in SDLTest_ExampleHitTestCallback Ozkan Sezer Following trivial patch adds missing SDLCALL to SDLTest_ExampleHitTestCallback()
Sam Lantinga 4b284298 2017-10-12T14:21:21 Android doesn't have libunwind.h in API 16
Sam Lantinga 41a60394 2017-10-12T14:20:17 Added missing file
Sam Lantinga 21cd2df6 2017-10-12T14:02:24 Fixed compiler warning
Sam Lantinga ba10d2b6 2017-10-12T13:55:35 Fixed compiler warning
Sam Lantinga 9c580e14 2017-10-12T13:44:28 Added functions to query and set the SDL memory allocation functions: SDL_GetMemoryFunctions() SDL_SetMemoryFunctions() SDL_GetNumAllocations()
Sam Lantinga 1887c54c 2017-10-12T13:28:48 Fixed memory leak in Cocoa mouse code The video quit call cleans up the mouse cursor driver data, which happens after mouse quit
Sam Lantinga f4cd68a5 2017-10-12T08:47:02 Fixed bug 3866 - CMake error when trying to make the 'uninstall' target when it already exists Steve Robinson In my project, the 'uninstall' target is already created by the glew library. I get this error when SDL2 tries to create it: CMake Error at _build/3rdparty/SDL2/SDL2-2.0.6/CMakeLists.txt:1816 (add_custom_target): add_custom_target cannot create target "uninstall" because another target with the same name already exists. The existing target is a custom target created in source directory "D:/Code/sdl2-tutorial/_build/3rdparty/glew/glew-2.1.0/build/cmake". See documentation for policy CMP0002 for more details. To fix it, go to the bottom of the SDL2 CMakeLists.txt file. Add an if statement to check for the existence of the target before creating it. The end result looks like this: if(NOT TARGET uninstall) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) endif() This is how the glew library deals with this possibility in their CMakeLists.txt file.
Sam Lantinga 4f38db17 2017-10-12T08:44:45 Fixed bug 3867 - Can't find install_manifest.txt when running 'uninstall' target Steve Robinson When I try to build the 'uninstall' target in CMake when SDL2 is added to a subdirectory of my project, I get this error: 1>CMake Error at cmake_uninstall.cmake:2 (message): 1> Cannot find install manifest: 1> "D:/Code/sdl2-tutorial/_build/3rdparty/SDL2/SDL2-2.0.6/install_manifest.txt" The install_manifest.txt is actually in the top-level binary directory, not the project-specific binary directory. To fix it, change all instances of: CMAKE_CURRENT_BINARY_DIR To: CMAKE_BINARY_DIR In: cmake_uninstall.cmake.in
Sam Lantinga f4f9e39f 2017-10-12T08:41:11 Fixed bug 3874 - Compiler warnings SDL_Surface.c and SDL_cocoakeyboard.m
Sam Lantinga a7c79c5e 2017-10-12T08:37:55 Normalize touch events to the render viewport (thanks Sylvain!)
Sam Lantinga 5bed4ca9 2017-10-12T08:27:22 Fixed divide by zero with a 1x1 sized window
Sam Lantinga 0ce23a54 2017-10-12T08:08:04 Updated version to 2.0.7
Ozkan Sezer bef0fec1 2017-10-12T14:28:05 make sure that SDL_malloc(0) or SDL_calloc(0,x) doesn't return NULL.
Sam Lantinga c0019b7f 2017-10-11T13:31:21 Fixed bug 3871 - Touch events are not normalised on X11 Trent Gamblin The documentation for SDL_TouchFingerEvent says that the x and y coordinates are normalised between 0-1. I've found that to be true on Windows, Android and iOS but on X11 they are in pixel coordinates. This patch fixes the issue. This was the cleanest way I could do it with what was available without changing things around a lot but you may know a better way.
Sam Lantinga b53c35df 2017-10-11T13:26:58 Fixed size in realloc
Ryan C. Gordon 5e5f2290 2017-10-11T12:07:43 audio: Turns out the accumulation errors sound better. :/ Moving to double fixed the overflows, but using "time = i * incr" instead of "time += incr" causes clicks in the output.
Ryan C. Gordon 9bd2c6b4 2017-10-11T11:51:14 audio: Moved the resampler state up to double precision. Fixes more buffer overflows.
Ryan C. Gordon b2f5123b 2017-10-11T11:43:35 audio: calculate resampling time directly, don't increment (thanks, Eric!). Fixes buffer overruns as floating point errors accumulate. Partially fixes Bugzilla #3848.