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

GeneralSettings: Update vsync after settings close #401

Merged
merged 5 commits into from
Oct 31, 2022

Conversation

goeiecool9999
Copy link
Contributor

No description provided.

@Exzap
Copy link
Contributor

Exzap commented Oct 23, 2022

The behavior is a bit inconsistent right now, at least on Vulkan. When it recreates the swapchain it will use whatever vsync mode is currently in the config (see VulkanRenderer::ChooseSwapPresentMode). Your message says a restart is required, but the new vsync will apply when the window is resized or anything else causes the swapchain to be recreated.

Imho we should just get rid of renderer->EnableVSync and have the render backends compare the active vsync mode against the one stored in the config once per frame. If it differs then switch to new vsync. At least in theory this should avoid any multi-threading issues.

@goeiecool9999
Copy link
Contributor Author

I've changed it according to your suggestions. Will probably cause a merge conflict with #399 but this should be far easier to review. Verified that it works for vulkan but I haven't tested OpenGL as I would have to use windows for that.

@Exzap
Copy link
Contributor

Exzap commented Oct 31, 2022

Looks good. No issues found while testing.

@Exzap Exzap merged commit c3182ae into cemu-project:main Oct 31, 2022
@goeiecool9999 goeiecool9999 deleted the updatevsyncsettings branch November 4, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants