mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-10-31 19:44:20 +00:00
<rmu fix
This commit is contained in:
parent
4a91448067
commit
75a1b3f9f4
|
@ -403,6 +403,12 @@ enum PlaybackStateType {
|
|||
Ogg(SavedOggPlaybackState),
|
||||
}
|
||||
|
||||
impl Default for PlaybackStateType {
|
||||
fn default() -> Self {
|
||||
Self::None
|
||||
}
|
||||
}
|
||||
|
||||
fn run<T>(
|
||||
rx: Receiver<PlaybackMessage>,
|
||||
bank: SoundBank,
|
||||
|
@ -526,11 +532,12 @@ where
|
|||
};
|
||||
}
|
||||
Ok(PlaybackMessage::RestoreState) => {
|
||||
let mut saved_state_loc = PlaybackStateType::None;
|
||||
std::mem::swap(&mut saved_state_loc, &mut saved_state);
|
||||
let saved_state_loc = std::mem::take(&mut saved_state);
|
||||
|
||||
match saved_state_loc {
|
||||
PlaybackStateType::None => {}
|
||||
PlaybackStateType::None => {
|
||||
state = PlaybackState::Stopped;
|
||||
}
|
||||
PlaybackStateType::Organya(playback_state) => {
|
||||
org_engine.set_state(playback_state, &bank);
|
||||
|
||||
|
|
Loading…
Reference in a new issue