It may be useful to look into this SDL patch and perhaps search for further improvements to the library.