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

Avoid JSON errors on Windows with no sound devices #76782

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

alef
Copy link
Contributor

@alef alef commented Oct 2, 2024

Summary

Bugfixes "Avoid JSON errors on Windows with no sound devices"

Purpose of change

One can forget to turn their Bluetooth device and be left without audio devices available.
In that case, the TILES+SOUND built game for Windows reports JSON errors loading soundset.

Describe the solution

Export sound_init_success from sdlsound.cpp and make init_interface() skip loading sound set at all when it is false.

Describe alternatives you've considered

Not sure why WinCreate() should initialize audio too.

Testing

Compiled, run, load, walk around. No errors (and no audio).
Connect the Bluetooth audio back: same but with audio.

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Oct 2, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Oct 2, 2024
@Maleclypse Maleclypse merged commit 1c24d32 into CleverRaven:master Oct 3, 2024
22 of 26 checks passed
@alef alef deleted the sound_init_failure branch October 4, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants