display_set_windows_alternate_sync

Set the vertical synchronisation method (Windows Only).

Syntax:

GML Code Example

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:

GML Code 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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here