force / detect resolution hertz

Blitz3D Forums/Blitz3D Beginners Area/force / detect resolution hertz

morduun - my tft screen runs with 60 Hz physical sync, and when I use Flip true, it will use 50 Hz instead and completely ignore synchronisation, resulting in ugly cut off frames.

THe only solution I see atm is to initially perform a test, somethin like this:

vwait
t1=millisecs()
delay 1
vwait
t2=millisecs()

hz=1000.0/(t2-t1)
if (hz>= 45) and (hz<=300) then ; assuming monitor has 45 to 300 Hz
 can_handle_vwait=1
else
 can_handle_vwait=0
endif
...
while  game
 ...
 if can_handle_vwait=1
  vwait
  flip 0
 else
  flip
 endif
wend


tho I used vwait:flip 0 in my latest demo and nobody mentioned any flickering...