Synchronizes display updates with hardware
Syntax
Usage
result = ScreenSync
Return Value
Zero if successful, or non-zero if a graphics mode was not previously set.
Description
This GfxLib statement stops the execution of the program until the graphics card signals it has ended tracing a frame and is going to start the new one. If the program uses the small interval of time between frames to redraw the image, the flickering is greatly reduced.
The use of the QB-compatible form WAIT &H3DA,8 is deprecated.
Example
'main loop
Do
' do user input
' calculate_a_frame
ScreenSync
' draw_ a_ frame
Loop Until Inkey <> ""
Dialect Differences
- Not available in the -lang qb dialect unless referenced with the alias __Screensync.
Differences from QB
- New to FreeBASIC.
- QBasic used WAIT &H3DA,8 for this purpose.
See also