pub fn auto_detect_resolution () -> (u32, u32) {
    //grab the resolution of the current monitor from the backend
    let monitor_size = BACKEND.lock().context_wrapper.as_ref().unwrap().wc.window().current_monitor().size();
    let resolution : (u32, u32) = (monitor_size.width, monitor_size.height);
    info!("Detected screen resolution: {} x {}", resolution.0, resolution.1);
    
    //convert the resolution of the monitor to tile dimensions
    let mut width = resolution.0 / 24;
    let mut height = resolution.1 /24;
    let width_remainder = width % 10;
    let height_remainder = height % 10;
    
    width = width - width_remainder;
    height = height - height_remainder;
    info!("Setting console tile resolution to: {} x {}", width, height);

    return (width, height);
}
/// Auto-detects the resolution of the monitor and returns dimensions of console in tiles, depending on the resolution.
Auto-detects the resolution of the monitor and returns dimensions of console in tiles, depending on the resolution.
Auto - detects the resolution of the monitor and returns dimensions of console in tiles depending on the resolution .
pub fn auto_detect_resolution () -> (u32, u32) {
    //grab the resolution of the current monitor from the backend
    let monitor_size = BACKEND.lock().context_wrapper.as_ref().unwrap().wc.window().current_monitor().size();
    let resolution : (u32, u32) = (monitor_size.width, monitor_size.height);
    info!("Detected screen resolution: {} x {}", resolution.0, resolution.1);
    //convert the resolution of the monitor to tile dimensions
    let mut width = resolution.0 / 24;
    let mut height = resolution.1 /24;
    let width_remainder = width % 10;
    let height_remainder = height % 10;
    width = width - width_remainder;
    height = height - height_remainder;
    info!("Setting console tile resolution to: {} x {}", width, height);
    return (width, height);
}
pub fn auto_detect_resolution ( ) -> ( u32 , u32 ) { //grab the resolution of the current monitor from the backend let monitor_size = BACKEND . lock ( ) . context_wrapper . as_ref ( ) . unwrap ( ) . wc . window ( ) . current_monitor ( ) . size ( ) ; let resolution : ( u32 , u32 ) = ( monitor_size . width , monitor_size . height ) ; info ! ( " " resolution 0 resolution 1 ) ; //convert the resolution of the monitor to tile dimensions let mut width = resolution . 0 / 24 ; let mut height = resolution . 1 / 24 ; let width_remainder = width % 10 ; let height_remainder = height % 10 ; width = width - width_remainder ; height = height - height_remainder ; info ! ( " " width height ) ; return ( width , height ) ; }
Auto-detects the resolution of the monitor and returns dimensions of console in tiles, depending on the resolution.
Auto - detects the resolution of the monitor and returns dimensions of console in tiles depending on the resolution .