mirror of
https://github.com/MrLowPr/overdrive.git
synced 2026-10-19 19:01:53 +02:00
12 lines
360 B
JavaScript
12 lines
360 B
JavaScript
// ../pub-game-store/native/ui/scale.js
|
|
// reconstructed from the esbuild bundle in eboot.bin
|
|
|
|
|
|
var SCALE = screen.width / 1280;
|
|
var TRANSFORM_PX = 512;
|
|
var px = (n) => Math.round(n * SCALE);
|
|
var logical = (n) => n / SCALE;
|
|
var canScale = (width, height) => px(width) <= TRANSFORM_PX && px(height) <= TRANSFORM_PX;
|
|
|
|
export { canScale, logical, px };
|