Skip to content

Commit

Permalink
#1152 Fix sporadic "FX not loadable" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Sep 3, 2024
1 parent b7e65c1 commit 0bfcf22
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion main/src/domain/main_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,6 @@ impl<EH: DomainEventHandler> MainProcessor<EH> {
// This only filters out "matched" outcomes, not "consumed" ones. This is important because it lets
// combination shortcuts through that are not matched. E.g. Cmd+B is let through if there is an active
// mapping listening to a "Cmd" (a modifier!) but there is no active mapping with source 'B'.
// TODO-high CONTINUE Check If this works on Windows as well.
let filter_out_event = match_outcome.matched();
KeyProcessingResult {
match_outcome,
Expand Down
4 changes: 2 additions & 2 deletions main/src/domain/targets/browse_fxs_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl RealearnTarget for BrowseFxsTarget {
if i == fx_index as usize {
fx.show_in_floating_window();
} else {
fx.hide_floating_window();
fx.hide_floating_window()?;
}
}
}
Expand All @@ -140,7 +140,7 @@ impl RealearnTarget for BrowseFxsTarget {
.fx_chain
.index_based_fx_by_index(fx_index)
.ok_or("FX not available")?;
fx.show_in_chain();
fx.show_in_chain()?;
}
},
}
Expand Down
4 changes: 2 additions & 2 deletions main/src/domain/targets/fx_open_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl RealearnTarget for FxOpenTarget {
if value.to_unit_value()?.is_zero() {
match self.display_type {
FloatingWindow => {
self.fx.hide_floating_window();
self.fx.hide_floating_window()?;
}
Chain => {
self.fx.chain().hide();
Expand All @@ -76,7 +76,7 @@ impl RealearnTarget for FxOpenTarget {
self.fx.show_in_floating_window();
}
Chain => {
self.fx.show_in_chain();
self.fx.show_in_chain()?;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion main/src/infrastructure/plugin/backbone_shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2906,7 +2906,7 @@ mod playtime_impl {
"It was not possible to add Helgobox VST plug-in, probably because you have VST scanning disabled in the REAPER preferences!\n\nPlease open REAPER's FX browser and press F5 to rescan. After that, try again!\n\nAs an alternative, re-enable VST scanning in Preferences/Plug-ins/VST and restart REAPER."
}
})?;
fx.hide_floating_window();
fx.hide_floating_window()?;
// The rest needs to be done async because the instance initializes itself async
// (because FX not yet available when plug-in instantiated).
Global::task_support()
Expand Down
2 changes: 1 addition & 1 deletion pot-browser/src/pot_browser_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ fn run_main_ui<I: PotBrowserIntegration>(
.on_hover_text("Shows the FX chain")
.clicked()
{
fx.show_in_chain();
fx.show_in_chain().unwrap();
}
if ui
.small_button("FX")
Expand Down
8 changes: 4 additions & 4 deletions pot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ fn load_audio_preset(
let window_is_open_now = fx.window_is_open();
if window_is_open_now {
if !fx.window_has_focus() {
fx.hide_floating_window();
fx.hide_floating_window()?;
fx.show_in_floating_window();
}
} else {
Expand Down Expand Up @@ -1860,12 +1860,12 @@ impl LoadPresetWindowBehavior {
match self {
LoadPresetWindowBehavior::NeverShow => {
if now_is_open {
fx.hide_floating_window();
fx.hide_floating_window().unwrap();
}
}
LoadPresetWindowBehavior::ShowOnlyIfPreviouslyShown => {
if !was_open_before && now_is_open {
fx.hide_floating_window();
fx.hide_floating_window().unwrap();
} else if was_open_before && !now_is_open {
fx.show_in_floating_window();
}
Expand All @@ -1881,7 +1881,7 @@ impl LoadPresetWindowBehavior {
fx.show_in_floating_window()
}
} else if !was_open_before && now_is_open {
fx.hide_floating_window();
fx.hide_floating_window().unwrap();
} else if was_open_before && !now_is_open {
fx.show_in_floating_window();
}
Expand Down

0 comments on commit 0bfcf22

Please sign in to comment.