• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Checking if it is "really" Vsync ON.

Nodamex

Member
Some players force VSync from their Nvidia Control Center. Is there any way to check if VSync is really ON?

Even if the game executed this:
display_reset(0, true)
I think VSync may be off.
 

DukeSoft

Member
I think also the "realfps" gets stuck to the screen refresh rate if VSync is on, but that might be from a specific video card or old GMS version. I think I saw that in the past. Apart from that, Sybok's answer is a good way to check, but I don't think you can do it automatically without using extensions.
 

Sybok

Member
I think also the "realfps" gets stuck to the screen refresh rate if VSync is on, but that might be from a specific video card or old GMS version. I think I saw that in the past. Apart from that, Sybok's answer is a good way to check, but I don't think you can do it automatically without using extensions.
That's where in this scenario you want to use 'fps' and not 'fps_real'. 'fps' will give you the actual frame rate.

I'm not even sure why people use fps_real, it is very misleading.
 

O.Stogden

Member
@Sybok fps_real is a good way to check out how much you have to work with, as Nodamex said.

If your fps_real is 80 or 300 on a good PC, you may never know as it'd probably hold at 60 actual FPS, but if it's 80 then you have a problem, as it means an average PC won't hold 60.

So it's a good way to see if your game needs optimization.
 

Sybok

Member
Yes, but 'fps' with room speed unlocked will give you fps actual. Can't get a better benchmark than that.

Anyway, I have advised you how to detect if vSync is on or not. What you do with that information is up to you.

As a side note with the way the internals of DirectX 11 (Windows Export) work, you don't enable or disable vSync as such anymore, like you used to with DirectX 9. It is merely a parameter on the Present() call, albeit done in GM's internals. 0 - Immediate, 1 - VSync, 2 - Half VSync, and 4 - Quarter Vsync. Which can be modified on a per frame basis. But, that's all beyond the scope of this topic and a bit of side trivia.
 
Top