Function GetVsyncFlag

From Uzebox Wiki
Jump to: navigation, search
Prototype

unsigned char GetVsyncFlag(void)

Description

Retreives the vertical sync (vsync) flag that is set when the rendering of a field is completed.

Parameters

None

Returns

Void

Video Modes

N/A

Since

V1

Notes

Fields are rendered 60 times per seconds so this flag is set at a rate of 60hz. For synchronizing on the refresh rate, WaitVsync() is recommended and support waiting for multiple frames.

Example:

while(1){
  if(GetVsyncFlag()){
    ClearVsyncFlag();
    //do someting...
  }
}