Skip to content

Commit

Permalink
Add log to output available video modes
Browse files Browse the repository at this point in the history
  • Loading branch information
richiemcilroy committed Mar 20, 2024
1 parent c92840d commit 014cb2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/desktop/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ fn main() {
let monitor: MonitorHandle = event_loop.primary_monitor().expect("No primary monitor found");
let video_modes: Vec<VideoMode> = monitor.video_modes().collect();

for mode in &video_modes {
println!("Video mode: {:?}", mode.size());
}

let max_mode = video_modes.iter().max_by_key(|mode| mode.size().width * mode.size().height);

let (max_width, max_height) = if let Some(max_mode) = max_mode {
Expand Down

1 comment on commit 014cb2a

@vercel
Copy link

@vercel vercel bot commented on 014cb2a Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.