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

SDL: Use an "EmuThread" in Vulkan mode #18268

Merged
merged 5 commits into from
Sep 29, 2023
Merged

SDL: Use an "EmuThread" in Vulkan mode #18268

merged 5 commits into from
Sep 29, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Sep 29, 2023

This avoids the problem of sampling input once per rendered frame, instead allowing inputs to arrive at any time, as seen from the emulation. Should help with the jittery feeling of input events reported on Linux by JMC for example.

Takes care of the Vulkan part of #17876 . Doing the same for OpenGL is iffier due to threading issues.

  • Add some missing functionality from the old loop
  • Test on Linux

@hrydgard hrydgard added the SDL2 Issue on SDL (or Qt in SDL code) but not all ports. label Sep 29, 2023
@hrydgard hrydgard added this to the v1.17.0 milestone Sep 29, 2023
@hrydgard hrydgard marked this pull request as ready for review September 29, 2023 17:36
@hrydgard hrydgard merged commit 526d304 into master Sep 29, 2023
18 checks passed
@hrydgard hrydgard deleted the sdl-input-latency branch September 29, 2023 18:16
@fp64
Copy link
Contributor

fp64 commented Sep 30, 2023

So, does #18056 needs fixing now?

@hrydgard
Copy link
Owner Author

hrydgard commented Oct 5, 2023

Hm, good point!

@hrydgard
Copy link
Owner Author

hrydgard commented Oct 5, 2023

Although they do seem to work as-is, I feel there might be a race condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDL2 Issue on SDL (or Qt in SDL code) but not all ports.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants