add HW v-sync support

kanged from KonstaT (thanks!)