get the encoder work off the main thread and harden the update path

This commit is contained in:
2026-09-21 06:29:39 +03:00
parent af30963223
commit 205f68222c
7 changed files with 125 additions and 67 deletions
+10 -1
View File
@@ -27,7 +27,14 @@ pub struct Config {
pub theme: Theme,
}
// Every persisted section carries a container-level `serde(default)`, so a
// config.toml written by an older build still loads once a field is added. The
// outer Config already defaulted its own fields; without the same treatment here
// a single unknown field made the whole file fail to parse, and the recovery
// path backs it up and rewrites defaults - losing the user's hotkeys and
// dropping them back into first-run.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default)]
pub struct ExportConfig {
pub default_format: Format,
pub gif_dither: GifDither,
@@ -48,15 +55,16 @@ pub enum CaptureQuality {
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default)]
pub struct CaptureConfig {
pub default_fps: u32,
pub capture_cursor: bool,
pub capture_audio: bool,
#[serde(default)]
pub capture_quality: CaptureQuality,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default)]
pub struct HotkeyConfig {
pub start: Option<String>,
pub stop: Option<String>,
@@ -64,6 +72,7 @@ pub struct HotkeyConfig {
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default)]
pub struct UpdatesConfig {
pub check_on_launch: bool,
}