diff --git a/apps/desktop/src-tauri/src/general_settings.rs b/apps/desktop/src-tauri/src/general_settings.rs index 9f3d40d661c..280d4302e15 100644 --- a/apps/desktop/src-tauri/src/general_settings.rs +++ b/apps/desktop/src-tauri/src/general_settings.rs @@ -74,7 +74,8 @@ pub struct GeneralSettingsStore { pub post_studio_recording_behaviour: PostStudioRecordingBehaviour, #[serde(default)] pub main_window_recording_start_behaviour: MainWindowRecordingStartBehaviour, - #[serde(default)] + // Renamed from `custom_cursor_capture` to `custom_cursor_capture2` so we can change the default. + #[serde(default = "default_true", rename = "custom_cursor_capture2")] pub custom_cursor_capture: bool, #[serde(default = "default_server_url")] pub server_url: String, @@ -112,6 +113,10 @@ fn no(_: &bool) -> bool { false } +fn default_true() -> bool { + true +} + fn default_server_url() -> String { std::option_env!("VITE_SERVER_URL") .unwrap_or("https://cap.so") @@ -144,7 +149,7 @@ impl Default for GeneralSettingsStore { window_transparency: false, post_studio_recording_behaviour: PostStudioRecordingBehaviour::OpenEditor, main_window_recording_start_behaviour: MainWindowRecordingStartBehaviour::Close, - custom_cursor_capture: false, + custom_cursor_capture: true, server_url: default_server_url(), recording_countdown: Some(3), enable_native_camera_preview: default_enable_native_camera_preview(), diff --git a/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx b/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx index aed79541bf1..fd7c12571bb 100644 --- a/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx +++ b/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx @@ -25,6 +25,7 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) { enableNativeCameraPreview: false, enableNewRecordingFlow: false, autoZoomOnClicks: false, + customCursorCapture2: true, }, ); @@ -57,8 +58,10 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) { handleChange("customCursorCapture", value)} + value={!!settings.customCursorCapture2} + onChange={(value) => + handleChange("customCursorCapture2", value) + } /> Auto diff --git a/apps/desktop/src/routes/editor/ExportDialog.tsx b/apps/desktop/src/routes/editor/ExportDialog.tsx index 094a6a7958b..b43fffc736e 100644 --- a/apps/desktop/src/routes/editor/ExportDialog.tsx +++ b/apps/desktop/src/routes/editor/ExportDialog.tsx @@ -134,15 +134,25 @@ export function ExportDialog() { const exportWithSettings = (onProgress: (progress: FramesRendered) => void) => exportVideo( projectPath, - { - format: settings.format, - fps: settings.fps, - resolution_base: { - x: settings.resolution.width, - y: settings.resolution.height, - }, - compression: settings.compression, - } as (Mp4ExportSettings & GifExportSettings) & { format: "Mp4" | "Gif" }, + settings.format === "Mp4" + ? { + format: "Mp4", + fps: settings.fps, + resolution_base: { + x: settings.resolution.width, + y: settings.resolution.height, + }, + compression: settings.compression, + } + : { + format: "Gif", + fps: settings.fps, + resolution_base: { + x: settings.resolution.width, + y: settings.resolution.height, + }, + quality: null, + }, onProgress, ); diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts index 41170046ff8..cd7ad470572 100644 --- a/apps/desktop/src/utils/tauri.ts +++ b/apps/desktop/src/utils/tauri.ts @@ -548,7 +548,7 @@ export type GeneralSettingsStore = { windowTransparency?: boolean; postStudioRecordingBehaviour?: PostStudioRecordingBehaviour; mainWindowRecordingStartBehaviour?: MainWindowRecordingStartBehaviour; - customCursorCapture?: boolean; + customCursorCapture2?: boolean; serverUrl?: string; recordingCountdown?: number | null; enableNativeCameraPreview: boolean;