Files
nixos-configs/packages/stremio-linux-shell/force-device-scale-factor.patch
T
johno da21505667
CI / check (push) Failing after 12m18s
CI / build-and-cache (push) Has been skipped
CI / Check OpenClaw Changes (push) Has been skipped
CI / Build & Push OpenClaw Image (push) Has been skipped
fix(kodi): patch stremio CEF to support HiDPI scaling via env var
The beta.13 clap parser ignores unknown --force-device-scale-factor flags
and CEF Args::new() starts empty, so CLI flags never reach the CEF subprocess.
Patch src/webview/mod.rs to read STREMIO_FORCE_DEVICE_SCALE_FACTOR and pass
it to CEF via append_switch_with_value. Remove failed GTK4/master branch
build attempt (requires GTK 4.22 not yet in nixpkgs).
2026-05-12 08:48:50 -07:00

21 lines
809 B
Diff

--- a/src/webview/mod.rs 2026-05-11 22:00:57.261117297 -0700
+++ b/src/webview/mod.rs 2026-05-11 22:09:44.824475918 -0700
@@ -56,6 +56,17 @@
let args = Args::new();
+
+ // Pass --force-device-scale-factor to CEF if the environment variable is set.
+ // This is the standard Chromium flag for HiDPI display scaling.
+ if let Ok(scale) = std::env::var("STREMIO_FORCE_DEVICE_SCALE_FACTOR") {
+ if let Some(cmd) = args.as_cmd_line() {
+ cmd.append_switch_with_value(
+ Some(&CefString::from("force-device-scale-factor")),
+ Some(&CefString::from(scale.as_str())),
+ );
+ }
+ }
let (sender, receiver) = unbounded::<WebViewEvent>();
SENDER.get_or_init(|| sender);