mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-08-09 02:32:50 +00:00
webOS: Fixed emulator resolution check
This commit is contained in:
parent
5061c095f3
commit
842eb1cd26
1 changed files with 29 additions and 19 deletions
|
@ -89,6 +89,15 @@ export class ServiceManager {
|
|||
|
||||
// CSS media queries do not work on older webOS versions...
|
||||
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');
|
||||
|
||||
if (resolution) {
|
||||
|
@ -113,6 +122,7 @@ export function initializeWindowSizeStylesheet() {
|
|||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function targetKeyUpEventListener(event: KeyboardEvent): { handledCase: boolean, key: string } {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue