Skip to content

Use MacOS-specific refresh rate check to avoid SDL race condition #1262

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

Merged
merged 2 commits into from
Aug 1, 2025

Conversation

OpenSauce04
Copy link
Member

Because MacOS is very sensitive when it comes to what is allowed to be done on non-main threads, if the input thread called SDL_PumpEvent while we were between SDL_Init and SDL_QuitSubSystem in the prior code, the emulator would completely crash.

To avoid this, we now use a MacOS-specific implementation of the refresh rate check which takes SDL out of the equation entirely, and as other OSes aren't as thread-sensitive, this should resolve the issue completely.

@OpenSauce04 OpenSauce04 added this to the 2123 milestone Jul 31, 2025
@OpenSauce04 OpenSauce04 requested a review from PabloMK7 July 31, 2025 23:39
@OpenSauce04 OpenSauce04 added the bug Something isn't working label Jul 31, 2025
@OpenSauce04 OpenSauce04 force-pushed the macos-refreshrate-check branch from f5bde2c to 34d4842 Compare July 31, 2025 23:43
@OpenSauce04 OpenSauce04 added the squash This pull request should be squashed if approved label Aug 1, 2025
@OpenSauce04 OpenSauce04 merged commit 885bb71 into azahar-emu:master Aug 1, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/M squash This pull request should be squashed if approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants