display_set_windows_alternate_sync

Set the vertical synchronisation method (Windows Only).

Syntax:

display_set_windows_alternate_sync(flag);


Argument Description
flag Use an alternative method (true) or the regular method (false).


Returns:N/A


Description

This Windows only function can be used to change the vertical synchronisation method at runtime. When set to true (and you have vSync active) an alternative method will be used to that which is the default, with the aim to reduce any possible visual lag or stuttering of your game. Note that this can also be set in the Global Game Settings and that it is only applicable Windows 7 and above - it will just use the default method if you have this option ticked and run on XP or Vista - and that it does not switch it on or off, for that you would use the function display_reset().


Example:

if !display_get_windows_alternate_sync()
   {
   display_set_windows_alternate_sync(true);
   }

The above code will check to see if the v-sync method is using the alternative or the default, and if it's the default it will switch to the alternative instead.


Back: Windows and Views
Next: display_get_windows_vertex_buffer_method
© Copyright YoYo Games Ltd. 2018 All Rights Reserved