Skip to content

[Enhancement] Pause sounds when window alerts pop up - #7914

Merged
AbnormalPoof merged 1 commit into
FunkinCrew:preview/public-playtestfrom
ahmed7p:alert-fix
Aug 16, 2026
Merged

[Enhancement] Pause sounds when window alerts pop up#7914
AbnormalPoof merged 1 commit into
FunkinCrew:preview/public-playtestfrom
ahmed7p:alert-fix

Conversation

@ahmed7p

@ahmed7p ahmed7p commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Linked Issues

#7875

Description

This PR pauses all game audio whenever native window alerts pop up to prevent music and sound effects from continuing while the main thread is frozen.

Changes:

  • Added a WindowUtil.alert() helper method that wraps lime.app.Application.current.window.alert().
  • Added FlxG.sound.onFocusLost() and onFocus() calls inside the wrapper to safely pause and resume audio during native popups.
  • Refactored showError(), showWarning(), and showInformation() in WindowUtil to route through the new alert() method.

Screenshots/Videos

Before

2026-08-10.15-59-53.mp4

After

2026-08-10.15-55-49.1.mp4

@github-actions github-actions Bot added pr: haxe PR modifies game code. status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. labels Aug 11, 2026
@NotHyper-474 NotHyper-474 added the type: enhancement Involves an enhancement or new feature. label Aug 11, 2026
@Hundrec Hundrec linked an issue Aug 11, 2026 that may be closed by this pull request
3 tasks
@NotHyper-474 NotHyper-474 added status: reviewing internally Under consideration and testing. and removed status: pending triage Awaiting review. labels Aug 15, 2026
@MAJigsaw77 MAJigsaw77 added status: accepted PR was approved for contribution. If it's not already merged, it may be merged on a private branch. and removed status: reviewing internally Under consideration and testing. labels Aug 15, 2026
@AbnormalPoof
AbnormalPoof merged commit a7aa36e into FunkinCrew:preview/public-playtest Aug 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. status: accepted PR was approved for contribution. If it's not already merged, it may be merged on a private branch. type: enhancement Involves an enhancement or new feature.

Development

Successfully merging this pull request may close these issues.

Enhancement: Make script errors pause gameplay

5 participants