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

ImGui: Make input recording frame count thread-safe #12175

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

TheTechnician27
Copy link
Contributor

@TheTechnician27 TheTechnician27 commented Jan 8, 2025

Description of Changes

Make the communication between the EE (input recording) and the GS (displaying the frame count via ImGui) thread-safe. Additionally fixes a bug where the frame count was +1 what it should actually be. See #10793, which this is a follow-up to. (This fixes a small bug from that as well.)

Rationale behind Changes

Good to have the correct value displayed (previously we would run into an issue where we would say that we're on a frame that doesn't exist yet; for example, if we'd written 580 frames to an input recording and were actively recording, we'd be on frame 581). And make the code operate in a way that's not subject to a potential race condition.

Suggested Testing Steps

Test input recording to make sure 1) the correct value is displayed and 2) nothing is broken.

Fixes

@kage2051
Copy link

It does not fix the determinism issues in some games though. I did a test with Zombie Zone, which seems to have inconsistent RNG between playbacks.

@TheLastRar
Copy link
Contributor

It does not fix the determinism issues in some games though. I did a test with Zombie Zone, which seems to have inconsistent RNG between playbacks.

So you have MTVU enabled or disabled?

@F0bes
Copy link
Member

F0bes commented Jan 17, 2025

Note that this PR is not rebased on top of #12183

@kage2051
Copy link

kage2051 commented Jan 17, 2025

So you have MTVU enabled or disabled?

MTVU disabled, Optimal Frame Pacing and CDVD Precaching enabled, everything else is at default setting.

@TheTechnician27
Copy link
Contributor Author

It does not fix the determinism issues in some games though.

Please note that this PR in no way intends to (or in all likelihood does) fix any problems with determinism; this is simply about the way that ImGui displays the current frame count.

@F0bes F0bes merged commit 36d8e5f into PCSX2:master Jan 20, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Total input counter is not updated upon loading state (input recording)
4 participants