mirror of
https://github.com/csd4ni3l/soundboard.git
synced 2026-03-10 09:09:24 +01:00
Fix Windows trying to use linux move_index_to_virtualmic func
This commit is contained in:
@@ -144,6 +144,7 @@ fn update_virtualmic(mut app_state: ResMut<AppState>) {
|
|||||||
|
|
||||||
if app_state.virt_output_index != app_state.virt_output_index_switch {
|
if app_state.virt_output_index != app_state.virt_output_index_switch {
|
||||||
app_state.virt_output_index = app_state.virt_output_index_switch.clone();
|
app_state.virt_output_index = app_state.virt_output_index_switch.clone();
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
linux_lib::move_index_to_virtualmic(app_state.virt_output_index_switch.clone());
|
linux_lib::move_index_to_virtualmic(app_state.virt_output_index_switch.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,7 +247,7 @@ fn ui_system(mut contexts: EguiContexts, mut app_state: ResMut<AppState>) -> Res
|
|||||||
#[cfg(target_os = "linux")] {
|
#[cfg(target_os = "linux")] {
|
||||||
let output_index = app_state.virt_output_index.clone();
|
let output_index = app_state.virt_output_index.clone();
|
||||||
let output_device = linux_lib::get_device_by_index("source-outputs", output_index);
|
let output_device = linux_lib::get_device_by_index("source-outputs", output_index);
|
||||||
if let Some(app_name) = output_device["properties"]["application.name"].as_str() {
|
if let Some(app_name) = output_fdevice["properties"]["application.name"].as_str() {
|
||||||
mic_name = app_name.to_string();
|
mic_name = app_name.to_string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user