Version of my patch in #340, but against main instead of SDL2. I tested the SDL2 version, I have not tested this version because I don't have working SDL3 environment the way I do with SDL2. But this area of the code doesn't look like it has changed at all between branches.
Fixes #339
Version of my patch in #340, but against main instead of SDL2. I tested the SDL2 version, I have not tested this version because I don't have working SDL3 environment the way I do with SDL2. But this area of the code doesn't look like it has changed at all between branches.