mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-03-23 10:29:18 +00:00
round viewport width on android
This commit is contained in:
parent
c4f1c60e35
commit
c82c65c39f
|
@ -130,7 +130,7 @@ fn get_insets() -> GameResult<(f32, f32, f32, f32)> {
|
|||
|
||||
fn get_scaled_size(width: u32, height: u32) -> (f32, f32) {
|
||||
let scaled_height = ((height / 480).max(1) * 480) as f32;
|
||||
let scaled_width = width as f32 * (scaled_height as f32 / height as f32);
|
||||
let scaled_width = (width as f32 * (scaled_height as f32 / height as f32)).floor();
|
||||
|
||||
(scaled_width, scaled_height)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue