Thanks to all the people who contributed code and feedback, SDL 2.0.20 is now available as a PRERELEASE build!

This is primarily a bug fix build, fixing a few regressions in 2.0.18:


  • SDL_RenderGeometryRaw() takes a pointer to SDL_Color, not int. You can cast color data in SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888 on little endian systems) for this parameter.
  • Improved accuracy of horizontal and vertical line drawing when using OpenGL or OpenGLES


  • Fixed size of custom cursors


  • Fixed hotplug controller detection, broken in 2.0.18

Something’s seriously wrong with that release. Whereas on all previous versions of SDL2, on all platforms, I get this rendering of a toolbar:

in the prerelease 2.0.20 it looks like this:

I don’t know where the color is coming from, but it’s clearly not right. :confused:

I suspect this is related to the ongoing SDL_RenderDrawLine() issue because the color seems to be arising from a call to filledPolygonColor() in SDL2_gfx, and this in turn calls SDL_RenderDrawLine() multiple times to render the polygon.

So hopefully it will come good when that particular issue is resolved.

Post the good news in the unofficial discord server on SDL Enthusiasts

Also anyway to add rectangle clips as an argument so we can do sprite geometry too?

Seems like the pre release was updated.

What do you think about using the github pre-release system?

Then we can see what’s included in them and testing is easier, because it doesn’t break our CI half way through. It also notifies more people, and makes automating testing of pre-releases easier.

1 Like

Yes, let’s look at that for 2.0.22.