Closes https://github.com/libsdl-org/SDL/pull/12854 (cherry picked from commit c076b0d17f)
c076b0d17f