Skip to content

Commit

Permalink
Made raw screen size method public
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBloom committed Feb 7, 2024
1 parent 364f11b commit f5d5498
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ pub(crate) fn get_raw_window_size() -> (u16, u16) {
.unwrap_or((120, 120))
}

pub(crate) fn get_raw_screen_size() -> (i32, i32) {
/// Calculates the number of pixels that can fit in the window.
pub fn get_raw_screen_size() -> (i32, i32) {
let s = web_sys::window().unwrap().screen().unwrap();
(s.width().unwrap(), s.height().unwrap())
}
Expand Down

0 comments on commit f5d5498

Please sign in to comment.