-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Sound not disabled when starting without focus #2287
Comments
looks like normal behavior for windows, even starcraft 2 does this. |
Actually I think it's just a bug that usually doesn't get addressed - normally you look for a Window Minimised Event, in this case you miss the event, and should probably check the Window status after init finishes. |
I agree with @zsilencer and don't think this is a bug. First, the setting is labelled 'disable sound on focus loss' so if there is no focus to begin with and therefore no focus loss, then I don't see why the sound should be disabled. Also if you have a slow PC and you start the game in the background then it's helpful to know when the game is loaded fully because that is when you're getting sound. If you start the game you usually want to have sound (and if not you usually want to disable sound completely anyway) so I think the current behaviour makes sense. |
I agree with @zsilencer and @HaasJona and this could also be treated as a very minor "bug". My advice would be to close this issue. Could anyone do this or say why that wouldn't be good? :) |
Still happens on v0.3.1 |
I cannot replicate this |
I can still reproduce the issue on 6d97bbd, though it sometimes mutes after about 1 second (depending on whether the other window is fullscreen, as far as I've tested). |
I think the issue is fixed even if there is a short delay before the music pauses. |
Defer calling `PlayTitleMusic()` the first time when OpenRCT2 starts until after SDL events have been polled. This allows the code to process focus events to mute the audio before the title music starts playing.
Defer calling `PlayTitleMusic()` the first time when OpenRCT2 starts until after SDL events have been polled. This allows the code to process focus events to mute the audio before the title music starts playing.
Defer calling `PlayTitleMusic()` the first time when OpenRCT2 starts until after SDL events have been polled. This allows the code to process focus events to mute the audio before the title music starts playing.
Defer calling `PlayTitleMusic()` the first time when OpenRCT2 starts until after SDL events have been polled. This allows the code to process focus events to mute the audio before the title music starts playing.
…ocus" This reverts commit feaafa4.
Enable 'disable sound on focus loss', start the game and go to another window before the game is started up. Even though the game doesn't have focus, sound is enabled. If you lose focus again after going back to the game the sound is disabled like it should.
The text was updated successfully, but these errors were encountered: