1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-08-09 10:42:50 +00:00

webOS: Fixed emulator resolution check

This commit is contained in:
Michael Hollister 2025-07-16 14:22:52 -05:00
parent 5061c095f3
commit 842eb1cd26

View file

@ -89,6 +89,15 @@ export class ServiceManager {
// CSS media queries do not work on older webOS versions... // CSS media queries do not work on older webOS versions...
export function initializeWindowSizeStylesheet() { export function initializeWindowSizeStylesheet() {
if (window.innerWidth !== 0 && window.innerHeight !== 0) {
if (window.innerWidth >= 1920 && window.innerHeight >= 1080) {
document.head.insertAdjacentHTML('beforeend', '<link rel="stylesheet" href="./1920x1080.css" />');
}
else {
document.head.insertAdjacentHTML('beforeend', '<link rel="stylesheet" href="./1280x720.css" />');
}
}
else {
const resolution = sessionStorage.getItem('resolution'); const resolution = sessionStorage.getItem('resolution');
if (resolution) { if (resolution) {
@ -114,6 +123,7 @@ export function initializeWindowSizeStylesheet() {
}; };
} }
} }
}
export function targetKeyUpEventListener(event: KeyboardEvent): { handledCase: boolean, key: string } { export function targetKeyUpEventListener(event: KeyboardEvent): { handledCase: boolean, key: string } {
let handledCase = false; let handledCase = false;