From ca779f8839da3dfb748ae55074bb981429a9d069 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Tue, 27 Apr 2021 08:43:30 +0100 Subject: [PATCH] make this conditional - don't need to execute this on linux for example --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9d8213f..1ed9b76 100644 --- a/src/main.rs +++ b/src/main.rs @@ -234,9 +234,11 @@ fn build_ui(application: >k::Application) { } fn main() { - // instantiate rodio before gtk and don't do anything with it - // this is silly but it's the easiest way to prevent cpal crashing on windows - rodio::default_output_device().unwrap(); + #[cfg(target_os = "windows")] { + // instantiate rodio before gtk and don't do anything with it + // this is silly but it's the easiest way to prevent cpal crashing on windows + rodio::default_output_device().unwrap(); + } let application = gtk::Application::new( Some("dev.tinybird.max.lull"),