Added a defer function,  used it and removed the corresponding workaround ! Fixes the issue with the first frame not being properly displayed (after a switch) when using DirtyRect.
Added a defer function,  used it and removed the corresponding workaround ! Fixes the issue with the first frame not being properly displayed (after a switch) when using DirtyRect.

MarkoIvanetic/melonJS,srbala/melonJS,MarkoIvanetic/melonJS,TukekeSoft/melonJS,gopalindians/melonJS,melonjs/melonJS,rlugojr/melonJS,TukekeSoft/melonJS,rlugojr/melonJS,srbala/melonJS,melonjs/melonJS,gopalindians/melonJS,rlugojr/melonJS,TukekeSoft/melonJS,srbala/melonJS,gopalindians/melonJS,Smoss/Enoru-eco,Smoss/Enoru-eco