# Sdl 2.0.12 released!

**URL:** <https://discourse.libsdl.org/t/sdl-2-0-12-released/27318>\
**Category:** SDL Announcements\
**Created:** [March 11, 2020, 1:20am UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318 "2020-03-11T01:20:29Z")\
**Posts on this page:** 14\
**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:** [March 11, 2020, 1:20am UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/1 "2020-03-11T01:20:30Z")

</div>

Thanks to all the people who contributed code and feedback, SDL 2.0.12 is now available!  
[https://www.libsdl.org/download-2.0.php](https://www.libsdl.org/download-2.0.php)

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

General:

- Added SDL\_GetTextureScaleMode() and SDL\_SetTextureScaleMode() to get and set the scaling mode used for a texture
- Added SDL\_LockTextureToSurface(), similar to SDL\_LockTexture() but the locked area is exposed as a SDL surface.
- Added new blend mode, SDL\_BLENDMODE\_MUL, which does a modulate and blend operation
- Added the hint SDL\_HINT\_DISPLAY\_USABLE\_BOUNDS to override the results of SDL\_GetDisplayUsableBounds() for display index 0.
- Added the window underneath the finger to the SDL\_TouchFingerEvent
- Added SDL\_GameControllerTypeForIndex(), SDL\_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro)
- Added the hint SDL\_HINT\_GAMECONTROLLERTYPE to override the automatic game controller type detection
- Added SDL\_JoystickFromPlayerIndex() and SDL\_GameControllerFromPlayerIndex() to get the device associated with a player index
- Added SDL\_JoystickSetPlayerIndex() and SDL\_GameControllerSetPlayerIndex() to set the player index associated with a device
- Added the hint SDL\_HINT\_GAMECONTROLLER\_USE\_BUTTON\_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled.
- Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL\_HINT\_JOYSTICK\_HIDAPI\_GAMECUBE to control whether this is used.
- Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver
- Added support for many game controllers, including:
  - 8BitDo FC30 Pro
  - 8BitDo M30 GamePad
  - BDA PS4 Fightpad
  - HORI Fighting Commander
  - Hyperkin Duke
  - Hyperkin X91
  - MOGA XP5-A Plus
  - NACON GC-400ES
  - NVIDIA Controller v01.04
  - PDP Versus Fighting Pad
  - Razer Raion Fightpad for PS4
  - Razer Serval
  - Stadia Controller
  - SteelSeries Stratus Duo
  - Victrix Pro Fight Stick for PS4
  - Xbox One Elite Series 2

- Fixed blocking game controller rumble calls when using the HIDAPI driver
- Added SDL\_zeroa() macro to zero an array of elements
- Added SDL\_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features

Windows:

- Fixed crash when using the release SDL DLL with applications built with gcc
- Fixed performance regression in event handling introduced in 2.0.10
- Added support for SDL\_SetThreadPriority() for UWP applications

Linux:

- Added the hint SDL\_HINT\_VIDEO\_X11\_WINDOW\_VISUALID to specify the visual chosen for new X11 windows
- Added the hint SDL\_HINT\_VIDEO\_X11\_FORCE\_EGL to specify whether X11 should use GLX or EGL by default

iOS / tvOS / macOS:

- Added SDL\_Metal\_CreateView() and SDL\_Metal\_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window.

iOS/ tvOS:

- Added support for Bluetooth Steam Controllers as game controllers

tvOS:

- Fixed support for surround sound on Apple TV

Android:

- Added SDL\_GetAndroidSDKVersion() to return the API level of the current device
- Added support for audio capture using OpenSL-ES
- Added support for Bluetooth Steam Controllers as game controllers
- Fixed rare crashes when the app goes into the background or terminates

---

<div class="post-metadata">

**Author:** ![blogdron](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/blogdron/32/5344_2.png) [@blogdron](https://discourse.libsdl.org/u/blogdron)\
**Post date:** [March 11, 2020, 6:43pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/2 "2020-03-11T18:43:50Z")

</div>

Do Re Mi Fa So La Minooor Si 😀 Goog Job. Thanks Dev Team

---

<div class="post-metadata">

**Author:** ![Isaboll1](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/i/b19c9b/32.png) [@Isaboll1](https://discourse.libsdl.org/u/Isaboll1)\
**Post date:** [March 12, 2020, 2:12pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/3 "2020-03-12T14:12:55Z")

</div>

How come the default behavior for switch pro controllers is to use buttons as labeled? doesn’t that work against the point of the game controller API (for consistent bindings regardless of controllers)?

Edit: using it seemed to keep the button layouts like how they usually are. was this a typo in the announcement?

---

<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:** [March 13, 2020, 2:43am UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/4 "2020-03-13T02:43:51Z")

</div>

Because that’s the layout that people who use those controllers natively are used to, and matches on-screen button prompts. Also, for those reasons, that’s the default behavior of Steam.

If your application needs to use the buttons by position rather than label, you can just set SDL\_HINT\_GAMECONTROLLER\_USE\_BUTTON\_LABELS to 0.

FYI, GameCube controllers and NES/SNES controllers are affected by this hint as well.

---

<div class="post-metadata">

**Author:** ![theweirdn8](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/76d3ee/32.png) [@theweirdn8](https://discourse.libsdl.org/u/theweirdn8)\
**Post date:** [March 13, 2020, 3:24am UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/5 "2020-03-13T03:24:01Z")

</div>

Just bought a USB PowerA Switch controller, but it doesn’t appear to be working on SDL, but does in Chrome/Steam.

The Blend\_MUL effect is pretty nice by the way.

 ![Game_Pencil_Engine_IDE_2020-03-12_22-52-05](https://discourse.libsdl.org/uploads/default/original/2X/7/71e7b28dde596aa2ded386087c7259a0fc6d250a.jpeg)

---

<div class="post-metadata">

**Author:** ![unddaasnoch](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/u/65b543/32.png) [@unddaasnoch](https://discourse.libsdl.org/u/unddaasnoch)\
**Post date:** [April 7, 2020, 12:28pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/6 "2020-04-07T12:28:02Z")

</div>

When does SDL3 will come out ?

---

<div class="post-metadata">

**Author:** ![dave.lawrence](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/d/e36b37/32.png) [@dave.lawrence](https://discourse.libsdl.org/u/dave.lawrence)\
**Post date:** [June 30, 2020, 4:25pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/9 "2020-06-30T16:25:57Z")

</div>

Hi,

Are there more details available on the Windows note:

**Fixed performance regression in event handling introduced in 2.0.10**

Could this explain possible ‘laggy’ mouse events and stuttering in window redraws – at worst apparently freezing for a few seconds?

---

<div class="post-metadata">

**Author:** ![igormorgado](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/igormorgado/32/3604_2.png) [@igormorgado](https://discourse.libsdl.org/u/igormorgado)\
**Post date:** [July 2, 2020, 7:13pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/10 "2020-07-02T19:13:37Z")

</div>

> [@unddaasnoch](#):
>
> When does SDL3 will come out ?

Why should we need SDL3? Do you think a major API revamp is needed? Any non solvable issues with actual architecture?

---

<div class="post-metadata">

**Author:** ![SourceSkyBoxer](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sourceskyboxer/32/3589_2.png) [@SourceSkyBoxer](https://discourse.libsdl.org/u/SourceSkyBoxer)\
**Post date:** [September 12, 2020, 10:20pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/11 "2020-09-12T22:20:14Z")

</div>

Hello everyone,

Please fix SDL\_MapRGB because it seems only blue if you use MapRGB then it has bug.  
I try legacy format. like SDL\_FillRect(screen, ref zero, SDL\_Color.Red)  
Result:

 ![grafik](https://discourse.libsdl.org/uploads/default/original/2X/1/14d6196bbda18ec6b220ca4b1a55c1248b82ce15.png)

Why do SDL\_MapRGB and SDL\_MapRGBA have problem with wrong color. If I use real color like 0xffff0000 = RED, for SDL\_MapRGB(A) seems blue in “r” That is like weird. Can you fix it?

PS I don’t know where do I report bug?

---

<div class="post-metadata">

**Author:** ![AntTheAlchemist](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/antthealchemist/32/3894_2.png) [@AntTheAlchemist](https://discourse.libsdl.org/u/AntTheAlchemist)\
**Post date:** [September 14, 2020, 10:03am UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/13 "2020-09-14T10:03:07Z")

</div>

> [@igormorgado](#):
>
> Why should we need SDL3?

The same reason SDL2 replaced SDL1. Removing the redundant code would break the interface, which is when a major version comes into play. Plans for SDL3 are already in place.

---

<div class="post-metadata">

**Author:** ![blogdron](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/blogdron/32/5344_2.png) [@blogdron](https://discourse.libsdl.org/u/blogdron)\
**Post date:** [September 14, 2020, 12:20pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/14 "2020-09-14T12:20:19Z")

</div>

Extremely strange words. This is the first time I hear about the desire to release a new major version.

> Removing the redundant code

What does this mean? If there are plans, what exactly do they relate to? Do you have links or other where you can get acquainted with this, probably I missed something or it was not public. If it’s easier, what is supposed to be removed specifically?

In its current form, I personally do not see fatal excesses in SDL2

(sorry for my english i used a translator)

---

<div class="post-metadata">

**Author:** ![AntTheAlchemist](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/antthealchemist/32/3894_2.png) [@AntTheAlchemist](https://discourse.libsdl.org/u/AntTheAlchemist)\
**Post date:** [September 14, 2020, 3:34pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/15 "2020-09-14T15:34:45Z")

</div>

One example from the top of my head: There are now two versions of all the drawing functions; one for int coordinates and one for float coordinates. We don’t need the int ones, but they are there to keep compatibility.

Another example: Some of the internal workings can only be improved by breaking the format of the interface.

SDL2 was the release of a new major version. That’s why we still have SDL1 in development because some projects still use it.

---

<div class="post-metadata">

**Author:** ![Daniel\_Gibson](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/daniel_gibson/32/3010_2.png) [@Daniel\_Gibson](https://discourse.libsdl.org/u/Daniel_Gibson)\
**Post date:** [September 14, 2020, 3:47pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/16 "2020-09-14T15:47:40Z")

</div>

I think calling SDL1 “in development” is a bit of an overstatement, and I think the only reason people still occasionally fix things there is that there’s no fully functional SDL1.2-on-SDL2 wrapper yet.

So in case there’s any concrete plans for SDL 2.1 or 3.0 - _please_ make sure to have a working wrapper for backwards compat **before** releasing the first version.

---

<div class="post-metadata">

**Author:** ![chickenSandwich](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/chickensandwich/32/3714_2.png) [@chickenSandwich](https://discourse.libsdl.org/u/chickenSandwich)\
**Post date:** [March 1, 2021, 3:27pm UTC](https://discourse.libsdl.org/t/sdl-2-0-12-released/27318/17 "2021-03-01T15:27:31Z")

</div>

Greetings,  
While using Sdl 2.0.10 calls to `SDL_GetNumVideoDisplays()` would return the correct number of displays attached to my machine(s). However, since Sdl 2.0.12, it only ever returns 1 display, when I have 2 (I have tried 2.0.12, 2.0.14, and 2.0.15).  
A similar situation exists with `SDL_GetNumVideoDrivers()`. In 2.0.10 it would return 3: x11, dummy, and Wayland. Since 2.0.12 it only return x11 and dummy.

OS: Pop!\_OS 20.04 LTS (64-bit)  
Graphics: NVidia (GeForce GTX 1660 Ti)

I am wondering if this is a bug, or an expected change, or if I’m missing something…Thanks.
