diff --git a/public/locales/de-de.yaml b/public/locales/de-de.yaml index 95cd1ee..1084594 100644 --- a/public/locales/de-de.yaml +++ b/public/locales/de-de.yaml @@ -141,6 +141,15 @@ settings: none: Aus esync: Esync fsync: Fsync + + # Wine Virtual Desktop + winevd: + title: Virtual Desktop + settings: + title: Virtual Desktop einstellung + items: + height: Höhe + width: Breite # GameMode gamemode: diff --git a/public/locales/en-us.yaml b/public/locales/en-us.yaml index f1119ec..caf8873 100644 --- a/public/locales/en-us.yaml +++ b/public/locales/en-us.yaml @@ -112,7 +112,7 @@ settings: in-launcher: Launcher text in-game: In-game text selectIcon: Select icon - + # Some buttons buttons: winetricks: winetricks @@ -141,6 +141,15 @@ settings: none: None esync: ESync fsync: FSync + + # Wine Virtual Desktop + winevd: + title: Virtual Desktop + settings: + title: Virtual Desktop settings + items: + height: Height + width: Width # GameMode gamemode: diff --git a/public/locales/es-es.yaml b/public/locales/es-es.yaml index c28511f..1eadc93 100644 --- a/public/locales/es-es.yaml +++ b/public/locales/es-es.yaml @@ -141,6 +141,15 @@ settings: none: Ninguna esync: ESync fsync: FSync + + # Escritorio Virtual de Wine + winevd: + title: Escritorio Virtual + settings: + title: Opciones del Escritorio Virtual + items: + height: Alto + width: Ancho # GameMode gamemode: diff --git a/public/locales/fr-fr.yaml b/public/locales/fr-fr.yaml index b1d2b58..9479a92 100644 --- a/public/locales/fr-fr.yaml +++ b/public/locales/fr-fr.yaml @@ -143,6 +143,15 @@ settings: none: Aucune esync: ESync fsync: FSync + + # Wine Virtual Desktop + winevd: + title: Bureau virtuel + settings: + title: Paramètres du Bureau virtuel + items: + height: Hauteur + width: Largeur # GameMode gamemode: diff --git a/public/locales/hu-hu.yaml b/public/locales/hu-hu.yaml index ca3e048..8bc5914 100644 --- a/public/locales/hu-hu.yaml +++ b/public/locales/hu-hu.yaml @@ -155,6 +155,15 @@ settings: tooltip: Ez az opció bekapcsolja az AMD FidelityFX Super Resolution (FSR)-t amely emeli a játékod felbontását FPS vesztése nélkül + # Wine Virtual Desktop + winevd: + title: Virtuális Asztal + settings: + title: Virtuális Asztal beállításai + items: + height: Magasság + width: Szélesség + # Unlock FPS fps_unlocker: title: FPS limit kikapcsolása diff --git a/public/locales/id-id.yaml b/public/locales/id-id.yaml index 6a890bd..62ce4db 100644 --- a/public/locales/id-id.yaml +++ b/public/locales/id-id.yaml @@ -140,6 +140,15 @@ settings: none: None esync: ESync fsync: FSync + + # Wine Virtual Desktop + winevd: + title: Virtual Desktop + settings: + title: Virtual Desktop settings + items: + height: Height + width: Width # GameMode gamemode: diff --git a/public/locales/it-it.yaml b/public/locales/it-it.yaml index 0df39d6..70f83eb 100644 --- a/public/locales/it-it.yaml +++ b/public/locales/it-it.yaml @@ -140,6 +140,15 @@ settings: none: Nessuno esync: ESync fsync: FSync + + # Wine Virtual Desktop + winevd: + title: Desktop virtuale + settings: + title: Impostazioni del desktop virtuale + items: + height: Altezza + width: Larghezza # GameMode gamemode: diff --git a/public/locales/ru-ru.yaml b/public/locales/ru-ru.yaml index 2668eaa..fc2f664 100644 --- a/public/locales/ru-ru.yaml +++ b/public/locales/ru-ru.yaml @@ -141,6 +141,15 @@ settings: none: Отключена esync: ESync fsync: FSync + + # Виртуальный рабочий стол Wine + winevd: + title: Виртуальный рабочий стол + settings: + title: Настройки виртуального рабочего стола + items: + height: Высота + width: Ширина # GameMode gamemode: diff --git a/public/locales/uwu.yaml b/public/locales/uwu.yaml index ec28016..9446c66 100644 --- a/public/locales/uwu.yaml +++ b/public/locales/uwu.yaml @@ -141,6 +141,15 @@ settings: none: none esync: Esync fsync: Fsync + + # Wine Virtual Desktop + winevd: + title: viwtuaw desktop + settings: + title: viwtuaw desktop settings + items: + height: height + width: width # GameMode gamemode: diff --git a/src/components/Checkbox.svelte b/src/components/Checkbox.svelte index 62ab6fe..64fec1f 100644 --- a/src/components/Checkbox.svelte +++ b/src/components/Checkbox.svelte @@ -16,12 +16,12 @@ Configs.get(prop).then((value) => active = value as boolean); - function updateCheckbox() + async function updateCheckbox() { active = !active; if (prop) - Configs.set(prop, active); + await Configs.set(prop, active); if (valueChanged) valueChanged(active); diff --git a/src/components/WineVDSettings.svelte b/src/components/WineVDSettings.svelte new file mode 100644 index 0000000..fa66aa8 --- /dev/null +++ b/src/components/WineVDSettings.svelte @@ -0,0 +1,61 @@ + +
+

{$_('settings.enhancements.items.winevd.settings.title')}

+ + + + + + + + + + + + +
+ {$_('settings.enhancements.items.winevd.settings.items.height')} + + +
+ {$_('settings.enhancements.items.winevd.settings.items.width')} + + +
+
+ + \ No newline at end of file diff --git a/src/defaultSettings.ts b/src/defaultSettings.ts index 8a97153..f691c7a 100644 --- a/src/defaultSettings.ts +++ b/src/defaultSettings.ts @@ -84,6 +84,33 @@ promisify(async () => { * @defaul "esync" */ winesync: 'esync', + + + /** + * Wine Virtual Desktop + */ + winevd: { + /** + * If it is enabled + * + * @default false + */ + enabled: false, + + /** + * Virtual Desktop Height + * + * @default 1280 + */ + height: 1280, + + /** + * Virtual Desktop Width + * + * @default 720 + */ + width: 720 + }, /** * vkBasalt preset to use diff --git a/src/settings.svelte b/src/settings.svelte index 2272e68..3293c60 100644 --- a/src/settings.svelte +++ b/src/settings.svelte @@ -18,6 +18,7 @@ import SelectionBox from './components/SelectionBox.svelte'; import DropdownCheckboxes from './components/DropdownCheckboxes.svelte'; import DiscordSettings from './components/DiscordSettings.svelte'; + import WineVDSettings from './components/WineVDSettings.svelte'; import DXVKSelectionList from './components/DXVKSelectionList.svelte'; import RunnerSelectionList from './components/RunnerSelectionList.svelte'; import ShadersSelection from './components/ShadersSelection.svelte'; @@ -42,6 +43,35 @@ fpsUnlockerAvailable = true, voiceUpdateRequired = false; + + let winevdSettings: object = {}, winevdSettingsUpdater = false; + + Configs.get('winevd').then((settings) => winevdSettings = settings as object); + + const WineVDBox = (value: boolean) => { + winevdSettings['enabled'] = value; + if (value) + Configs.set('fsr', false); + } + + const handleWineVD = (field: 'height' | 'width', value: string) => { + winevdSettings[field] = parseInt(value); + + // This thing will update config file only after a second + // so we'll not update it every time user prints some character + // in textarea + if (!winevdSettingsUpdater) + { + winevdSettingsUpdater = true; + + setTimeout(() => { + winevdSettingsUpdater = false; + + Configs.set('winevd', winevdSettings); + }, 1000); + } + }; + let discordSettings: object = {}, discordSettingsUpdater = false; Configs.get('discord').then((settings) => discordSettings = settings as object); @@ -299,6 +329,15 @@ }} /> + WineVDBox(value)} + /> + + +
+ => { else console.warn(`GPU ${LauncherLib.getConfig('gpu')} not found. Launching on the default GPU`); }*/ - let command = `"${path.addSlashes(wineExeutable)}" ${await Configs.get('fps_unlocker') ? 'unlockfps.bat' : 'launcher.bat'}`; + let command = `"${path.addSlashes(wineExeutable)}" ${await Configs.get('winevd.enabled') ? `explorer /desktop=animegame,${await Configs.get('winevd.height')}x${await Configs.get('winevd.width')}` : ''} ${await Configs.get('fps_unlocker') ? 'unlockfps.bat' : 'launcher.bat'}`; /** * Gamemode integration