Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support synchronizing host with console refresh rate #7803

Closed
wants to merge 2 commits into from

Conversation

stenzek
Copy link
Contributor

@stenzek stenzek commented Feb 14, 2019

This PR adds an option to change the host refresh rate in fullscreen mode whenever the console refresh rate changes. This is especially useful for PAL/50hz games where you'll see repeated frames or tearing as the vertical sync intervals do not line up. It may make a tiny difference with NTSC games, as there is a subtle difference between 59.94hz and 60hz. For best results, ensure vsync is on.

It also cleans up fullscreen handling in Qt, which was a little messy before.

Currently it's only implemented on Windows. Results may differ depending on what your monitor capabilities are. FWIW, I can use 50, 59.94 and 60hz on my monitors and TV over HDMI.

Only the last commit is relevant, I built it on top of my videocommon work. It's not completely dependent on it, but avoids future merge conflicts.

Note: Going forward, formally supporting G-Sync/FreeSync would probably be a good idea too (especially for those displays which can't support the other refresh rates). But I don't have one of these displays yet :)

  • Basic implementation
  • Implement on Linux
  • Re-implement fullscreen resolutions

Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing the interresting commit is the last one? The other ones look like a mix of other PRs which may or may not be merged at this point.

Source/Core/VideoCommon/RenderBase.cpp Outdated Show resolved Hide resolved
@JMC47
Copy link
Contributor

JMC47 commented Feb 14, 2019

Works perfectly in F-Zero GX, I can turn on vsync without it crashing in Dualcore, which means it's definitely running at the correct framerate.

Windows really doesn't like it though, my desktop gets glitched up every time I enter fullscreen, with my desktop icons getting randomly strewn about. Still... vsync working is worth it.

@JMC47
Copy link
Contributor

JMC47 commented Feb 14, 2019

Panichandlers need to be disabled when using this mode, as it's a hard lock.

@AdmiralCurtiss
Copy link
Contributor

AdmiralCurtiss commented Feb 14, 2019

This crashes in ExpansionInterface::PauseAndLock() for me due to dereferencing null pointers in g_Channels. It seems like Core::PauseAndLock() is called before ExpansionInterface::Init() ever happens?

e: Seems like a race condition, I see another thread going through HW::Init() when the Core::PauseAndLock() call happens.

@ichee
Copy link

ichee commented Apr 10, 2019

Video stutters that occur with 30fps games is resolved with this pr.

Currently, we do not display every second frame in 25fps/30fps games
which run to vsync. This improves performance as there's less rendering
for the GPU to perform, but when combined with vsync, could cause frame
pacing issues.

This commit adds an option to force every frame generated by the console
to be displayed to the host, which may improve pacing for these games.
This option changes the host refresh rate to match the guest refresh
rate when it is possible. This reduces the frequency of repeated frames
in 50hz games.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants