fullscreen (#360)

* fullscreen

* improvements, and error catching

* yarn prettier

* discord rpc

* fixed uninitialized options.txt

* working discord version

* incorrect boolean

* change

* merge issue; regex solution

* fixed error

* multi line mode

* moved \n to start
This commit is contained in:
Wyatt Verchere
2023-07-27 00:10:07 -07:00
committed by GitHub
parent ce01ee6a2d
commit c364468ed5
20 changed files with 367 additions and 56 deletions

View File

@@ -182,6 +182,9 @@
<span class="label__title size-card-header">Window</span>
</h3>
</div>
<div class="adjacent-input">
<DropdownSelect v-model="forceFullscreen" :options="fullscreenOptions" />
</div>
<div class="adjacent-input">
<Checkbox v-model="overrideWindowSettings" label="Override global window settings" />
</div>
@@ -439,10 +442,12 @@ const maxMemory = Math.floor((await get_max_memory().catch(handleError)) / 1024)
const overrideWindowSettings = ref(!!props.instance.resolution)
const resolution = ref(props.instance.resolution ?? globalSettings.game_resolution)
const overrideHooks = ref(!!props.instance.hooks)
const hooks = ref(props.instance.hooks ?? globalSettings.hooks)
const fullscreenOptions = ref(['Leave unchanged', 'Set windowed', 'Set fullscreen'])
const forceFullscreen = ref(props.instance.force_fullscreen)
watch(
[
title,
@@ -458,6 +463,7 @@ watch(
memory,
overrideWindowSettings,
resolution,
forceFullscreen,
overrideHooks,
hooks,
],
@@ -505,6 +511,10 @@ watch(
editProfile.resolution = resolution.value
}
if (forceFullscreen.value) {
editProfile.force_fullscreen = forceFullscreen.value
}
if (overrideHooks.value) {
editProfile.hooks = hooks.value
}