Skip to content

Commit

Permalink
fix(mmclient): ensure --ui-scale overrides environment scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmarc committed Jul 30, 2024
1 parent 953b9d4 commit 776b4dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mm-client/src/bin/mmclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ struct MainLoop {

struct App {
configured_resolution: Resolution,
configured_ui_scale: Option<f64>,
configured_codec: protocol::VideoCodec,
configured_framerate: u32,
configured_preset: u32,
Expand Down Expand Up @@ -765,7 +766,11 @@ impl App {
.and_then(|a| a.streaming_resolution.clone());
let remote_scale = self.remote_display_params.ui_scale.as_ref().unwrap();

let desired_ui_scale = determine_ui_scale(self.window.scale_factor());
let desired_ui_scale = determine_ui_scale(
self.configured_ui_scale
.unwrap_or(self.window.scale_factor()),
);

let desired_streaming_res = Some(determine_resolution(
self.configured_resolution,
self.window_width,
Expand Down Expand Up @@ -1039,6 +1044,7 @@ fn main() -> Result<()> {
configured_codec,
configured_framerate: args.framerate,
configured_resolution: args.resolution,
configured_ui_scale: args.ui_scale,
configured_preset: args.preset + 1,

window,
Expand Down

0 comments on commit 776b4dc

Please sign in to comment.