Function GetVsyncFlag

From Uzebox Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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...
  }
}