Fixes https://github.com/libsdl-org/SDL/issues/13135 (cherry picked from commit 7db0ac7380)
7db0ac7380