* Isolated display - web and backend Isolated display - web and backend * Moved settings outside of the advanced display * Update virtual_display.cpp with isolated setting for better maintenance Update virtual_display.cpp with isolated setting for better maintenance. The isolated routine becomes an additional routine instead of a replacement for the original one. * Changed source formatting, removed English in non-English languages, removed test code Changed source formatting, removed English in non-English languages, removed test code * change blank/unused lines in config.cpp change blank/unused lines in config.cpp * Change blank lines in DisplayDeviceOptions.vue Change blank lines in DisplayDeviceOptions.vue * Change line spacing in config.h Change line spacing in config.h * Changed line spacing in config.cpp Changed line spacing in config.cpp * Changed lines/line spacing in virtual_display.cpp Changed lines/line spacing in virtual_display.cpp * Fix spaceing on virtual_display.cpp Fix spaceing on virtual_display.cpp * Added check to not do anything if the virtual display is not active. Added check to not do anything to the order of the displays if the isolated checkbox is set and if the virtual display is not active. * Minor formatting fix w/ add Chinese locale * Expose `matchDisplay` though not used for now --------- Co-authored-by: Yukino Song <nutosservice@gmail.com>
184 lines
5.7 KiB
Vue
184 lines
5.7 KiB
Vue
<script setup>
|
|
import {ref, computed, inject} from 'vue'
|
|
import {$tp} from '../../platform-i18n'
|
|
import PlatformLayout from '../../PlatformLayout.vue'
|
|
import AdapterNameSelector from './audiovideo/AdapterNameSelector.vue'
|
|
import DisplayOutputSelector from './audiovideo/DisplayOutputSelector.vue'
|
|
import DisplayDeviceOptions from "./audiovideo/DisplayDeviceOptions.vue";
|
|
import DisplayModesSettings from "./audiovideo/DisplayModesSettings.vue";
|
|
import Checkbox from "../../Checkbox.vue";
|
|
|
|
const $t = inject('i18n').t;
|
|
|
|
const props = defineProps([
|
|
'platform',
|
|
'config',
|
|
'vdisplay',
|
|
'min_fps_factor',
|
|
])
|
|
|
|
const sudovdaStatus = {
|
|
'1': 'Unknown',
|
|
'0': 'Ready',
|
|
'-1': 'Uninitialized',
|
|
'-2': 'Version Incompatible',
|
|
'-3': 'Watchdog Failed'
|
|
}
|
|
|
|
const currentDriverStatus = computed(() => sudovdaStatus[props.vdisplay])
|
|
|
|
const config = ref(props.config)
|
|
|
|
const validateFallbackMode = (event) => {
|
|
const value = event.target.value;
|
|
if (!value.match(/^\d+x\d+x\d+(\.\d+)?$/)) {
|
|
event.target.setCustomValidity($t('config.fallback_mode_error'));
|
|
} else {
|
|
event.target.setCustomValidity('');
|
|
}
|
|
|
|
event.target.reportValidity();
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div id="audio-video" class="config-page">
|
|
<!-- Audio Sink -->
|
|
<div class="mb-3">
|
|
<label for="audio_sink" class="form-label">{{ $t('config.audio_sink') }}</label>
|
|
<input type="text" class="form-control" id="audio_sink"
|
|
:placeholder="$tp('config.audio_sink_placeholder', 'alsa_output.pci-0000_09_00.3.analog-stereo')"
|
|
v-model="config.audio_sink" />
|
|
<div class="form-text pre-wrap">
|
|
{{ $tp('config.audio_sink_desc') }}<br>
|
|
<PlatformLayout :platform="platform">
|
|
<template #windows>
|
|
<pre>tools\audio-info.exe</pre>
|
|
</template>
|
|
<template #linux>
|
|
<pre>pacmd list-sinks | grep "name:"</pre>
|
|
<pre>pactl info | grep Source</pre>
|
|
</template>
|
|
<template #macos>
|
|
<a href="https://github.com/mattingalls/Soundflower" target="_blank">Soundflower</a><br>
|
|
<a href="https://github.com/ExistentialAudio/BlackHole" target="_blank">BlackHole</a>.
|
|
</template>
|
|
</PlatformLayout>
|
|
</div>
|
|
</div>
|
|
|
|
<PlatformLayout :platform="platform">
|
|
<template #windows>
|
|
<!-- Virtual Sink -->
|
|
<div class="mb-3">
|
|
<label for="virtual_sink" class="form-label">{{ $t('config.virtual_sink') }}</label>
|
|
<input type="text" class="form-control" id="virtual_sink" :placeholder="$t('config.virtual_sink_placeholder')"
|
|
v-model="config.virtual_sink" />
|
|
<div class="form-text pre-wrap">{{ $t('config.virtual_sink_desc') }}</div>
|
|
</div>
|
|
<!-- Install Steam Audio Drivers -->
|
|
<Checkbox class="mb-3"
|
|
id="install_steam_audio_drivers"
|
|
locale-prefix="config"
|
|
v-model="config.install_steam_audio_drivers"
|
|
default="true"
|
|
></Checkbox>
|
|
|
|
<Checkbox class="mb-3"
|
|
id="keep_sink_default"
|
|
locale-prefix="config"
|
|
v-model="config.keep_sink_default"
|
|
default="true"
|
|
></Checkbox>
|
|
|
|
<Checkbox class="mb-3"
|
|
id="auto_capture_sink"
|
|
locale-prefix="config"
|
|
v-model="config.auto_capture_sink"
|
|
default="true"
|
|
></Checkbox>
|
|
</template>
|
|
</PlatformLayout>
|
|
|
|
<!-- Disable Audio -->
|
|
<Checkbox class="mb-3"
|
|
id="stream_audio"
|
|
locale-prefix="config"
|
|
v-model="config.stream_audio"
|
|
default="true"
|
|
></Checkbox>
|
|
|
|
<AdapterNameSelector
|
|
:platform="platform"
|
|
:config="config"
|
|
/>
|
|
|
|
<DisplayOutputSelector
|
|
:platform="platform"
|
|
:config="config"
|
|
/>
|
|
|
|
<DisplayDeviceOptions
|
|
:platform="platform"
|
|
:config="config"
|
|
/>
|
|
|
|
<!-- Display Modes -->
|
|
<DisplayModesSettings
|
|
:platform="platform"
|
|
:config="config"
|
|
/>
|
|
|
|
<!-- Fallback Display Mode -->
|
|
<div class="mb-3">
|
|
<label for="fallback_mode" class="form-label">{{ $t('config.fallback_mode') }}</label>
|
|
<input
|
|
type="text"
|
|
class="form-control"
|
|
id="fallback_mode"
|
|
v-model="config.fallback_mode"
|
|
placeholder="1920x1080x60"
|
|
@input="validateFallbackMode"
|
|
/>
|
|
<div class="form-text">{{ $t('config.fallback_mode_desc') }}</div>
|
|
</div>
|
|
|
|
<!-- Headless Mode -->
|
|
<Checkbox class="mb-3"
|
|
id="headless_mode"
|
|
locale-prefix="config"
|
|
v-model="config.headless_mode"
|
|
default="false"
|
|
v-if="platform === 'windows'"
|
|
></Checkbox>
|
|
|
|
<!-- Double Refreshrate -->
|
|
<Checkbox class="mb-3"
|
|
id="double_refreshrate"
|
|
locale-prefix="config"
|
|
v-model="config.double_refreshrate"
|
|
default="false"
|
|
v-if="platform === 'windows'"
|
|
></Checkbox>
|
|
|
|
<!-- Isolated Virtual Display -->
|
|
<Checkbox class="mb-3"
|
|
id="isolated_virtual_display_option"
|
|
locale-prefix="config"
|
|
v-model="config.isolated_virtual_display_option"
|
|
default="false"
|
|
v-if="platform === 'windows'"
|
|
></Checkbox>
|
|
|
|
<!-- SudoVDA Driver Status -->
|
|
<div class="alert" :class="[vdisplay ? 'alert-warning' : 'alert-success']" v-if="platform === 'windows'">
|
|
<i class="fa-solid fa-xl fa-circle-info"></i> SudoVDA Driver status: {{currentDriverStatus}}
|
|
</div>
|
|
<div class="form-text" v-if="platform === 'windows' && vdisplay">Please ensure SudoVDA driver is installed to the latest version and enabled properly.</div>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
</style>
|