fix: linux build

This commit is contained in:
2025-03-04 15:59:37 +01:00
parent 443467c3ab
commit daafe1856b
3 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,5 @@
use crate::profile::Profile;
use anyhow::{Result, anyhow};
use anyhow::Result;
#[cfg(target_os = "windows")]
pub struct DisplayInfo {
@ -8,13 +8,15 @@ pub struct DisplayInfo {
target_settings: displayz::DisplaySettings
}
#[allow(dead_code)]
#[cfg(not(target_os = "windows"))]
pub async fn prepare_display(p: &Profile) -> Result<()> {
pub async fn prepare_display(_: &Profile) -> Result<()> {
Ok(())
}
#[cfg(target_os = "windows")]
pub async fn prepare_display(p: &Profile) -> Result<Option<DisplayInfo>> {
use anyhow::anyhow;
use displayz::{query_displays, Orientation, Resolution};
let display_name = p.get_str("display", "default");