I’m considering writing some unit tests and would want to mock some SDL functions. Any idea what would be a good way to achieve that?
I’ve run into this: https://hg.libsdl.org/SDL/file/default/docs/README-dynapi.md. This document discloses existence of function table that SDL uses internally. This seems perfect for me, as it could be used to replace real functions with mocked ones as well as invoke real ones if needed. Is there any (not-entirely-hackish) way to access the table for this purpose?