fix: player overflowing viewport

This commit is contained in:
John Beresford
2024-03-14 18:18:32 -07:00
parent d954585665
commit c9ac40e4ab
2 changed files with 10 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ function onPlay() {
</script>
<template>
<v-row v-if="rom" no-gutters>
<v-row v-if="rom" class="h-screen" no-gutters>
<v-col v-if="!gameRunning" cols="3" class="px-3">
<v-img
class="mx-auto mt-6 mb-5"
@@ -113,7 +113,7 @@ function onPlay() {
</v-btn>
</v-col>
<v-col class="my-4 bg-primary" rounded id="game-wrapper">
<v-col class="bg-primary" rounded id="game-wrapper">
<player :rom="rom" :state="stateRef" :save="saveRef" />
</v-col>
</v-row>
@@ -122,5 +122,7 @@ function onPlay() {
<style>
#game-wrapper {
aspect-ratio: 16 / 9;
max-width: 100%;
max-height: 100%;
}
</style>

View File

@@ -389,6 +389,12 @@ window.EJS_onGameStart = async () => {
<div id="game"></div>
</template>
<style scoped>
#game {
max-height: 100dvh;
}
</style>
<!-- Other config options: https://emulatorjs.org/docs/Options.html -->
<!-- window.EJS_biosUrl; -->