]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Fix MIDI Loading Failing Whilst a MIDI is playing (#23339)
authorHannah Giovanna Dawson <karakkaraz@gmail.com>
Thu, 4 Jan 2024 02:19:22 +0000 (02:19 +0000)
committerGitHub <noreply@github.com>
Thu, 4 Jan 2024 02:19:22 +0000 (13:19 +1100)
commit1defdebd7bb29cafa1f4cb4ef496ef6928634168
tree8643d4ebfe769ab6e9fab52d8cee62c5fab8fed5
parent128b5da3b4b92689fcdfc438ea3ee148197a8e68
Fix MIDI Loading Failing Whilst a MIDI is playing (#23339)

SS14-1148 Fix MIDI Loading Failing Whilst a MIDI is playing

The behaviour of the button event handling did some wonky
async handling that got PJB swearing repeatedly in the contributor
VC.

Improve switching MIDI songs by:

0. Add a bool that tracks if we're currently waiting for the MIDI file
browser to terminate. Use this bool to short-circuit the
MidiFileButtonOnPressed function, ensuring you don't have to close
a morbillion file windows if you spam-clicked the  button or forgot
you'd opened the window.
1. Remove a four-year-old hack involving waiting 100ms to load a MIDI
after trying to stop the last MIDI, because _the rot consumes_ or some shit
Content.Client/Instruments/UI/InstrumentMenu.xaml.cs