Sdl 2.0.8 released!

Thanks to all the people who contributed code and feedback, SDL 2.0.8 is now available!
http://www.libsdl.org/download-2.0.php

In addition to lots of bug fixes and build improvements, here are the major changes in this release:

General:

  • Added SDL_fmod() and SDL_log10()
  • Each of the SDL math functions now has the corresponding float version
  • Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709

Windows:

  • Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation
  • Added resampling support on WASAPI on Windows 7 and above

Windows UWP:

  • Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on

Mac OS X:

Mac OS X / iOS / tvOS:

  • Added a Metal 2D render implementation
  • Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() to insert your own drawing into SDL rendering when using the Metal implementation

iOS:

  • Added the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to control whether the home indicator bar on iPhone X should be hidden. This defaults to dimming the indicator for fullscreen applications and showing the indicator for windowed applications.

iOS / Android:

  • Added the hint SDL_HINT_RETURN_KEY_HIDES_IME to control whether the return key on the software keyboard should hide the keyboard or send a key event (the default)

Android:

  • SDL now supports building with Android Studio and Gradle by default, and the old Ant project is available in android-project-ant
  • SDL now requires the API 19 SDK to build, but can still target devices down to API 14 (Android 4.0.1)
  • Added SDL_IsAndroidTV() to tell whether the application is running on Android TV

Android / tvOS:

  • Added the hint SDL_HINT_TV_REMOTE_AS_JOYSTICK to control whether TV remotes should be listed as joystick devices (the default) or send keyboard events.

Linux:

  • Added the hint SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR to control whether the X server should skip the compositor for the SDL application. This defaults to “1”
  • Added the hint SDL_HINT_VIDEO_DOUBLE_BUFFER to control whether the Raspberry Pi and KMSDRM video drivers should use double or triple buffering (the default)
4 Likes

I’m not able to create a vulkan window with the latest SDL_WINDOW_VULKAN. The error is “my driver do not support vulkan.”. It’s not true because I can run examples of Vulkan.
My code:
SDL_INIT(SDL_VIDEO); // return 0
SDL_Vulkan_LoadLibrary(NULL); // no support video driver.
SDL_createWindow(…) // called with SDL_WINDOW_VULKAN flag

Thank you sooo much for the ability to build with Android Studio!! I have been waiting on this for years. Not only can I build and run my code on my phone but I can also place break points, step through code and examine variable values. I couldn’t be happier!

2 Likes

SDL comes with Vulkan SDK thrid-part works

I’m not able to create a vulkan window with the latest SDL_WINDOW_VULKAN. The error is “my driver do not support vulkan.”.

Is the exact string “No Vulkan support in video driver” ?

If so, it means your build of SDL was compiled without Vulkan support (regardless of whether your system has Vulkan support or not).

–ryan.

yep. Problem solved. Thank you.

1 Like

Suggestion: Would it be possible to return a different error string for
this case, like “SDL was not built with Vulkan support”?

Cheers,
Daniel

1 Like

I was just thinking that same thing. :slight_smile:

Send a patch, I’ll apply it. There’s actually a few of these in SDL, but I’m not sure they all use the exact same wording to be searched/replaced.

–ryan.

I found a few instances in SDL_video.c, for Vulkan, OpenGL and dynamic GL (SDL_GL_LoadLibrary()).
In one place the wording "Vulkan support is either not configured in SDL " "or not available in video driver" is used, and something like this could probably be used in all these cases…

However, probably the most confusion is caused by the term “video driver” which people assume to be the GPU driver they installed on their systems, while it really means “SDL video backend”.
But as this term is used all over SDL, including the API (SDL_GetVideoDriver() etc) I’m not sure if changing it wouldn’t cause even more confusion?

I wrote a patch (see attachment of this post), the error messages are now like Vulkan support is either not configured in SDL or not available in current SDL video driver (x11) or platform
I guess that should be clear enough.

Cheers,
Daniel

sdl2-video-errormsgs.patch (3.0 KB)

I have this particular problem which happens on Linux, on Windows it works ok:

  • create two windows
  • while pressing and holding mouse button in window#1 drag it over window#2, window#2 does not receive mouse motion events
  • the window#1 still receives mouse motion events while dragging onto it

It’s like when dragging from one window to another locks the other window(s).
I need it to implement a docking system, to drag tabs across many windows.
Thanks for any clue.