mirror of
https://github.com/csd4ni3l/soundboard.git
synced 2026-03-10 09:09:24 +01:00
Fix Windows build crashing because virtual_mic is Option Device not just Device (not inside let Some)
This commit is contained in:
@@ -60,18 +60,6 @@ pub fn create_virtual_mic_windows() -> (OutputStream, OutputStream) {
|
||||
});
|
||||
|
||||
if let Some(virtual_mic) = virtual_mic {
|
||||
// nothing, let Some doesnt support !
|
||||
}
|
||||
else {
|
||||
MessageDialog::new()
|
||||
.set_title("VB Cable Driver not installed.")
|
||||
.set_description("Could not access VB Cable output device. Is VB Cable Driver installed?")
|
||||
.set_buttons(MessageButtons::Ok)
|
||||
.show();
|
||||
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
route_standard_to_virtual(&host, &virtual_mic);
|
||||
|
||||
let normal_output = host
|
||||
@@ -89,3 +77,13 @@ pub fn create_virtual_mic_windows() -> (OutputStream, OutputStream) {
|
||||
.expect("Failed to open stream"),
|
||||
);
|
||||
}
|
||||
else {
|
||||
MessageDialog::new()
|
||||
.set_title("VB Cable Driver not installed.")
|
||||
.set_description("Could not access VB Cable output device. Is VB Cable Driver installed?")
|
||||
.set_buttons(MessageButtons::Ok)
|
||||
.show();
|
||||
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user