recreate window on resolution change. This fixes misplaced controls when changing resolution in fullscreen mode.
Use double buffering variable to toggle vsync
Re-create context when changing HWSURFACE or DOUBLEBUF