# Sdl 2.0.10 released!

**URL:** <https://discourse.libsdl.org/t/sdl-2-0-10-released/26429>\
**Category:** SDL Announcements\
**Created:** [July 25, 2019, 6:42pm UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429 "2019-07-25T18:42:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [July 25, 2019, 6:42pm UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/1 "2019-07-25T18:42:52Z")

</div>

Thanks to all the people who contributed code and feedback, SDL 2.0.10 is now available!  
[http://www.libsdl.org/download-2.0.php](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:

- The SDL\_RW\* macros have been turned into functions that are available only in 2.0.10 and onward
- Added SDL\_SIMDGetAlignment(), SDL\_SIMDAlloc(), and SDL\_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU
- Added SDL\_RenderDrawPointF(), SDL\_RenderDrawPointsF(), SDL\_RenderDrawLineF(), SDL\_RenderDrawLinesF(), SDL\_RenderDrawRectF(), SDL\_RenderDrawRectsF(), SDL\_RenderFillRectF(), SDL\_RenderFillRectsF(), SDL\_RenderCopyF(), SDL\_RenderCopyExF(), to allow floating point precision in the SDL rendering API.
- Added SDL\_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode.
- The SDL rendering API now uses batched rendering by default, for improved performance
- Added SDL\_RenderFlush() to force batched render commands to execute, if you’re going to mix SDL rendering with native rendering
- Added the hint SDL\_HINT\_RENDER\_BATCHING to control whether batching should be used for the rendering API. This defaults to “1” if you don’t specify what rendering driver to use when creating the renderer.
- Added the hint SDL\_HINT\_EVENT\_LOGGING to enable logging of SDL events for debugging purposes
- Added the hint SDL\_HINT\_GAMECONTROLLERCONFIG\_FILE to specify a file that will be loaded at joystick initialization with game controller bindings
- Added the hint SDL\_HINT\_MOUSE\_TOUCH\_EVENTS to control whether SDL will synthesize touch events from mouse events
- Improved handling of malformed WAVE and BMP files, fixing potential security exploits

Linux:

- Removed the Mir video driver in favor of Wayland

iOS / tvOS:

- Added support for Xbox and PS4 wireless controllers in iOS 13 and tvOS 13
- Added support for text input using Bluetooth keyboards

Android:

- Added low latency audio using OpenSL ES
- Removed SDL\_HINT\_ANDROID\_SEPARATE\_MOUSE\_AND\_TOUCH (replaced by SDL\_HINT\_MOUSE\_TOUCH\_EVENTS and SDL\_HINT\_TOUCH\_MOUSE\_EVENTS)  
SDL\_HINT\_ANDROID\_SEPARATE\_MOUSE\_AND\_TOUCH=1, should be replaced by setting both previous hints to 0.  
SDL\_HINT\_ANDROID\_SEPARATE\_MOUSE\_AND\_TOUCH=0, should be replaced by setting both previous hints to 1.
- Added the hint SDL\_HINT\_ANDROID\_BLOCK\_ON\_PAUSE to set whether the event loop will block itself when the app is paused.

---

<div class="post-metadata">

**Author:** ![BrianBathory](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/brianbathory/32/3813_2.png) [@BrianBathory](https://discourse.libsdl.org/u/BrianBathory)\
**Post date:** [July 25, 2019, 8:41pm UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/2 "2019-07-25T20:41:52Z")

</div>

🤘🥳

---

<div class="post-metadata">

**Author:** ![goobliata](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/goobliata/32/3126_2.png) [@goobliata](https://discourse.libsdl.org/u/goobliata)\
**Post date:** [July 26, 2019, 5:57am UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/3 "2019-07-26T05:57:02Z")

</div>

Nice, thanks. Is OpenSL ES the default now? I did notice some latency in audio on Android in previous versions. Wonder if forcing OpenSL ES (if it’s not default) would be safe if targeting Android 6.0+?

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [July 27, 2019, 4:45am UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/4 "2019-07-27T04:45:19Z")

</div>

Yes, OpenSL ES is the default.

---

<div class="post-metadata">

**Author:** ![Tribal](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/d9b06d/32.png) [@Tribal](https://discourse.libsdl.org/u/Tribal)\
**Post date:** [July 27, 2019, 6:56pm UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/5 "2019-07-27T18:56:38Z")

</div>

I can’t to compile new downloaded version of SDL-2.0.10-12951via CMake on Android, previous version (2.0.9) compiled fine.  
I don’t even know why it compiled hidapi PS4 and Xbox for Android gradle project, seems to it was added in **macro(CheckHIDAPI)**

```
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c:389: error: undefined reference to 'hid_write'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c:518: error: undefined reference to 'hid_read_timeout'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c:241: error: undefined reference to 'hid_get_feature_report'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c:235: error: undefined reference to 'hid_write'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c:230: error: undefined reference to 'hid_read_timeout'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c:372: error: undefined reference to 'hid_write'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c:718: error: undefined reference to 'hid_read_timeout'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c:277: error: undefined reference to 'hid_write'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapi_xboxone.c:276: error: undefined reference to 'hid_read_timeout'
  C:/gdev/SDL2/src/joystick/hidapi/SDL_hidapijoystick.c:872: error: undefined reference to 'hid_enumerate'
```

---

<div class="post-metadata">

**Author:** ![Tribal](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/d9b06d/32.png) [@Tribal](https://discourse.libsdl.org/u/Tribal)\
**Post date:** [July 28, 2019, 6:16am UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/6 "2019-07-28T06:16:41Z")

</div>

Basically I don’t need SDL\_JOYSTICK so I would like to disable it but with  
set(SDL\_JOYSTICK OFF CACHE BOOL “” FORCE)  
set(HIDAPI OFF CACHE BOOL “” FORCE)  
set(SDL\_HAPTIC OFF CACHE BOOL “” FORCE)

I also receive a lot of compiler errors. How can I disable hidapi library without too many modifications in code ?

> C:/gdev/SDL2/src/dynapi/SDL\_dynapi\_procs.h:0: error: undefined reference to ‘SDL\_GameControllerClose\_REAL’  
> C:/gdev/SDL2/src/dynapi/SDL\_dynapi\_procs.h:0: error: undefined reference to ‘SDL\_HapticName\_REAL’  
> C:/gdev/SDL2/src/dynapi/SDL\_dynapi\_procs.h:0: error: undefined reference to ‘SDL\_JoystickOpen\_REAL’

Finally I found a solution but I had to link all libraries as static:

> file(GLOB MY\_HIDAPI\_SOURCES ${SDL2\_SOURCE\_DIR}/src/hidapi/android/hid.cpp)  
> set(SOURCE\_FILES ${SOURCE\_FILES} ${MY\_HIDAPI\_SOURCES})

Than link all together in one big SDL-static library

> set(SDL\_STATIC\_ENABLED\_BY\_DEFAULT ON CACHE BOOL “” FORCE)  
> set(SDL\_STATIC\_PIC ON CACHE BOOL “” FORCE) # It’s due to ERROR libSDL2.a(hid.cpp.o): requires unsupported dynamic reloc R\_ARM\_REL32; recompile with -fPIC

---

<div class="post-metadata">

**Author:** ![goobliata](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/goobliata/32/3126_2.png) [@goobliata](https://discourse.libsdl.org/u/goobliata)\
**Post date:** [July 29, 2019, 12:19am UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/7 "2019-07-29T00:19:46Z")

</div>

To note, this: [tvOS Menu button with GameController API](https://discourse.libsdl.org/t/tvos-menu-button-with-gamecontroller-api/25798) is still a problem on tvOS with 2.0.10. Just me experiencing this?

There is also a bug report here: [https://bugzilla.libsdl.org/show\_bug.cgi?id=4531](https://bugzilla.libsdl.org/show_bug.cgi?id=4531)

I’ll try and find what caused it sometime soonish.

EDIT: I’ve fixed most of the problems using some hints and by ignoring remotes with only a few buttons (not opening them.) For Menu to return to the OS from the toplevel of the game, I needed this patch:

```
diff -ur SDL2-2.0.10/src/video/uikit/SDL_uikitview.m SDL2-2.0.10-goob/src/video/uikit/SDL_uikitview.m
--- SDL2-2.0.10/src/video/uikit/SDL_uikitview.m	2019-07-28 20:26:20.000000000 -0600
+++ SDL2-2.0.10-goob/src/video/uikit/SDL_uikitview.m	2019-07-28 20:25:34.000000000 -0600
@@ -261,7 +261,7 @@
         return SDL_SCANCODE_RETURN;
     case UIPressTypeMenu:
         /* HIG says: "returns to previous screen" */
- return SDL_SCANCODE_ESCAPE;
+ return SDL_SCANCODE_MENU;
     case UIPressTypePlayPause:
         /* HIG says: "secondary button behavior" */
         return SDL_SCANCODE_PAUSE;

```

For some reason Menu was changed to Escape which makes it impossible to exit to the OS which I believe is part of Apple’s requirements of tvOS apps. For the record, I use this code in my event filter to handle the Menu button properly (I set pass\_menu\_to\_os on the title screen to true.)

```
case SDL_APP_DIDENTERFOREGROUND:
    SDL_SetHint(SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS, "0");
    return 0;
case SDL_KEYDOWN:
case SDL_KEYUP:
    if (event->key.keysym.sym == SDLK_MENU && pass_menu_to_os) {
	    SDL_SetHint(SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS, "1");
    }
return 1;
```

---

<div class="post-metadata">

**Author:** ![Daid](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/daid/32/3864_2.png) [@Daid](https://discourse.libsdl.org/u/Daid)\
**Post date:** [September 19, 2019, 7:03am UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/8 "2019-09-19T07:03:18Z")

</div>

> Removed SDL\_HINT\_ANDROID\_SEPARATE\_MOUSE\_AND\_TOUCH

I’m surprised this was done in a minor version increase, as it’s an API breaking change. I thought SDL was pretty keen on backwards compatibility? As I read, that’s why SDL\_ShowCursor is global instead of per window.

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [September 22, 2019, 5:51pm UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/9 "2019-09-22T17:51:19Z")

</div>

We do occasionally change the API, especially around hints, which are not guaranteed functionality. We don’t ever intentionally break the ABI in minor versions.

---

<div class="post-metadata">

**Author:** ![Daid](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/daid/32/3864_2.png) [@Daid](https://discourse.libsdl.org/u/Daid)\
**Post date:** [September 23, 2019, 1:40pm UTC](https://discourse.libsdl.org/t/sdl-2-0-10-released/26429/10 "2019-09-23T13:40:27Z")

</div>

Excuse my ignorance, but isn’t this this breaking the ABI? If I would swap out SDL2 for a newer version without recompiling anything it would suddenly start generating mouse events for touch events on android.

Also, [https://wiki.libsdl.org/CategoryHints](https://wiki.libsdl.org/CategoryHints) still needs to be updated, not sure who does that.
