Skip to content

Commit

Permalink
fix: Downsampling breaks on systems with multiple monitors. #15
Browse files Browse the repository at this point in the history
  • Loading branch information
THEGOLDENPRO committed Oct 31, 2024
1 parent 1a00b4a commit 1254060
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ egui_extras = { version = "0.29.1", features = ["all_loaders"]}
image = {version = "0.25.3", features = ["jpeg", "png"]}
egui_animation = "0.6.0"
simple-easing = "1.0.1"
rdev = "0.5.3"
log = "0.4.22"
env_logger = "0.11.5"
re_format = "0.18.2"
cap = "0.1.2"
clap = {version = "4.5.20", features = ["derive"]}
rand = "0.8.5"
display-info = "0.5.1"

[profile.dev.package."*"]
opt-level = 3
12 changes: 10 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::Duration;

use rdev::display_size;
use display_info::DisplayInfo;
use cirrus_theming::Theme;
use eframe::egui::{self, Color32, ImageSource, Margin, Rect, Vec2};

Expand Down Expand Up @@ -71,7 +71,15 @@ impl eframe::App for Roseate {
if !self.image_loaded {
let mutable_image = self.image.as_mut().unwrap();

let (width, height) = display_size().expect("Failed to get monitor size!");
let all_display_infos = DisplayInfo::all().expect(
"Failed to get information about monitor!"
);

let primary_display_apparently = all_display_infos.first().expect(
"Uhhhhh, you don't have a monitor. WHAT!"
);

let (width, height) = (primary_display_apparently.width, primary_display_apparently.height);

let mut optimizations = Vec::new();

Expand Down

0 comments on commit 1254060

Please sign in to comment.