Add x4 multisampling

Fix vsync check.
Make various pointers nullptr check explicit.