Android rendering messed up (all red) on Mali-400MP4 GPU

Hi everyone,

I’ve just started a closed beta for my game Sim Betting Football, which is based on SDL 2 (2.0.3) and one of the testers reported a very weird behaviour when running the game on a Samsung S3 (Android 4.3).

Basically every colour is turned into red as showed in the following pics:


The most weird thing is that if he takes a screenshot the images come up with the right colours.

I did some digging on Google and found other games suffer the same bug, for example openXcom.
That guy was experiencing this problem on a Galaxy Note 10.1 which has a Mali-400MP4 as GPU, the same used by the S3.
My game works fine on a Sony Xperia U with a Mali-400 instead. So it seems to be very specific to that particular GPU.

Any idea how to fix this?

I was pointed out in the ML that this is a well known SDL 2 bug and that possible workarounds can be found in this bug report.

I’ll post an update when/if I can fix it in my game.

Confirmed fix and more comments in this other post (which is created from the mailing list).