checks if vsync is usable (to avoid problems with VM)
updated coding style
tabs to spaces
Merge pull request #1445 from bosoni/master

checks if vsync is usable (to avoid problems with VM)
Merge pull request #1447 from blackberry/master

Merge to next