kripken/emscripten — pull request #738 by ecrips (2012-12-02 20:14:23+00:00)
Title: A bunch of fixes to the SDL implementation

I had to make some fixes the SDL library implementation in emscripten to get my application to work correctly.

The fixes are:
* SDL_MapRGB(A) should return a colour value suitable for writing into a Locked surface. But the byte order was reversed. I've corrected the order.
* A cache of the surface data is kept to speed up Lock/Unlock. However this cache needs to be invalidated when other accesses to the surface are made. I've added this for FillRect and Blit
* SDL timers have a return value which allows for reoccurring timers - I've added support for that.