Apart from simplifying one line of code, this can also resolve a bug (missing sounds + unexpected clicks) when used with SDL 2.0.10. I originally tried running sdl-sopwith with this version, given that it's what you get from Ubuntu 20.04 LTS' repository.
Apart from simplifying one line of code, this can also resolve a bug (missing sounds + unexpected clicks) when used with SDL 2.0.10. I originally tried running sdl-sopwith with this version, given that it's what you get from Ubuntu 20.04 LTS' repository.
This is probably the impacting SDL commit, which is in 2.0.12: https://github.com/libsdl-org/SDL/commit/aef1ed4ac66fa11a551389153089c414947033d5
Another commit to mention (albeit not for the bug found by me) is the following one from 2.0.22: https://github.com/libsdl-org/SDL/commit/bf66720a4d5feeb1d06dcb1d1a0156ac015bba4b
These are the changes applied by me: