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

Sleep(10) inside XMPGetPlaybackController causes issues in certain games #1749

Closed
emoose opened this issue Feb 1, 2021 · 1 comment · Fixed by #1750
Closed

Sleep(10) inside XMPGetPlaybackController causes issues in certain games #1749

emoose opened this issue Feb 1, 2021 · 1 comment · Fixed by #1750
Labels

Comments

@emoose
Copy link
Contributor

emoose commented Feb 1, 2021

As noted at xenia-project/game-compatibility#154 (comment), removing the Sleep(10) call from XMPGetPlaybackController fixes issues with MGS2 taking 5-10 minutes to load, and fixes the rapid flashing during menus/gameplay.

Apparently that Sleep is there because A-Train would spawn a thread that looped over XMPGetPlaybackController forever, but in MGS2's case it's calling XMPGetPlaybackController from the main thread, and I guess making main thread sleep is a bad idea...

(E: MGS3 also has the same issue calling it from main thread, but in MGS3 case it just reduces framerate + slows down gameplay, not as major as MGS2)

Maybe there's a check we can add so it only sleeps if it's outside main thread?
IIRC wasn't A-Train one of the first games to run on Xenia too? I wonder if it's behavior has changed at all since then, maybe a Sleep here is unneeded now.

@spacebear84
Copy link

How do I remove the sleep from main thread?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants