diff --git a/flutter/android/app/build.gradle b/flutter/android/app/build.gradle index a2a1a02a3..94fc645af 100644 --- a/flutter/android/app/build.gradle +++ b/flutter/android/app/build.gradle @@ -32,7 +32,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 32 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' } diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 98ac20bfe..d5837c09c 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -271,7 +271,7 @@ _keepScaleBuilder() { } _registerEventHandler() { - if (desktopType != DesktopType.main) { + if (isDesktop && desktopType != DesktopType.main) { platformFFI.registerEventHandler('theme', 'theme', (evt) async { String? dark = evt['dark']; if (dark != null) { diff --git a/src/client.rs b/src/client.rs index cc1f78b78..baf06833a 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1415,11 +1415,9 @@ where let latency_controller = LatencyController::new(); let latency_controller_cl = latency_controller.clone(); - // Create video_handler out of the thread below to ensure that the handler exists before client start. - // It will take a few tenths of a second for the first time, and then tens of milliseconds. - let mut video_handler = VideoHandler::new(latency_controller); std::thread::spawn(move || { + let mut video_handler = VideoHandler::new(latency_controller); loop { if let Ok(data) = video_receiver.recv() { match data {