moved app_mode to its own file

This commit is contained in:
2026-05-22 09:07:10 +01:00
parent 70c6bd17c8
commit 88ac752d9e
20 changed files with 24 additions and 886 deletions
@@ -38,13 +38,7 @@ impl FbViewport {
let viewport_x = ((win_w - viewport_w) * 0.5).floor();
let viewport_y = ((win_h - viewport_h) * 0.5).floor();
Some(FbViewport {
x: viewport_x,
y: viewport_y,
w: viewport_w,
h: viewport_h,
scale,
})
Some(FbViewport { x: viewport_x, y: viewport_y, w: viewport_w, h: viewport_h, scale })
}
}
@@ -126,10 +120,7 @@ impl HostInputHandler {
let fb_x = (local_x / viewport.scale).floor() as i32;
let fb_y = (local_y / viewport.scale).floor() as i32;
Some((
fb_x.clamp(0, Hardware::W as i32 - 1),
fb_y.clamp(0, Hardware::H as i32 - 1),
))
Some((fb_x.clamp(0, Hardware::W as i32 - 1), fb_y.clamp(0, Hardware::H as i32 - 1)))
}
}
}
}