Fixes: https://github.com/libsdl-org/SDL/issues/12948. (cherry picked from commit 17bba029ba)
17bba029ba