Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions apps/desktop/src-tauri/src/general_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
enableNativeCameraPreview: false,
enableNewRecordingFlow: false,
autoZoomOnClicks: false,
customCursorCapture2: true,
},
);

Expand Down Expand Up @@ -57,8 +58,10 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
<ToggleSetting
label="Custom cursor capture in Studio Mode"
description="Studio Mode recordings will capture cursor state separately for customisation (size, smoothing) in the editor. Currently experimental as cursor events may not be captured accurately."
value={!!settings.customCursorCapture}
onChange={(value) => handleChange("customCursorCapture", value)}
value={!!settings.customCursorCapture2}
onChange={(value) =>
handleChange("customCursorCapture2", value)
}
/>
<ToggleSetting
label="Native camera preview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {
enableNativeCameraPreview: false,
enableNewRecordingFlow: false,
autoZoomOnClicks: false,
customCursorCapture2: true,
},
);

Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/routes/editor/ConfigSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ function ZoomSegmentConfig(props: {
<KTabs.Trigger
value="auto"
class="z-10 flex-1 py-2.5 text-gray-11 transition-colors duration-100 outline-none ui-selected:text-gray-12 peer"
disabled={!generalSettings.data?.customCursorCapture}
disabled={!generalSettings.data?.customCursorCapture2}
>
Auto
</KTabs.Trigger>
Expand Down
28 changes: 19 additions & 9 deletions apps/desktop/src/routes/editor/ExportDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/utils/tauri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ export type GeneralSettingsStore = {
windowTransparency?: boolean;
postStudioRecordingBehaviour?: PostStudioRecordingBehaviour;
mainWindowRecordingStartBehaviour?: MainWindowRecordingStartBehaviour;
customCursorCapture?: boolean;
customCursorCapture2?: boolean;
Comment thread
oscartbeaumont marked this conversation as resolved.
Resolved
serverUrl?: string;
recordingCountdown?: number | null;
enableNativeCameraPreview: boolean;
Expand Down