mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-20 17:01:47 +03:00
Added custom shaders option in settings menu
This commit is contained in:
parent
ec046faee9
commit
c404cc486e
5 changed files with 15 additions and 7 deletions
|
@ -107,4 +107,5 @@ settings:
|
|||
title: Shaders
|
||||
tooltip: Benutze die Home/POS1 taste um die Shader in-spiel zu togglen
|
||||
items:
|
||||
none: None
|
||||
none: None
|
||||
custom: Custom
|
|
@ -106,4 +106,5 @@ settings:
|
|||
title: Shaders
|
||||
tooltip: Use Home button to toggle shaders in the game
|
||||
items:
|
||||
none: None
|
||||
none: None
|
||||
custom: Custom
|
|
@ -105,4 +105,5 @@ settings:
|
|||
title: Шейдеры
|
||||
tooltip: Используйте кнопку Home чтобы переключать шейдеры в игре
|
||||
items:
|
||||
none: Отключены
|
||||
none: Отключены
|
||||
custom: Кастомные
|
|
@ -14,9 +14,10 @@
|
|||
Shaders.list().then((list) => {
|
||||
shaders = list;
|
||||
|
||||
list.forEach((shader) => {
|
||||
for (const shader of list)
|
||||
shadersOptions[shader.folder] = shader.name;
|
||||
});
|
||||
|
||||
shadersOptions['custom'] = 'settings.shaders.items.shaders.items.custom';
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -77,13 +77,17 @@ export default (launcher: Launcher): Promise<void> => {
|
|||
|
||||
if (shaders !== 'none')
|
||||
{
|
||||
const userShadersFile = `${constants.paths.shadersDir}/public/${shaders}/vkBasalt.conf`;
|
||||
const launcherShadersFile = `${await constants.paths.launcherDir}/vkBasalt.conf`;
|
||||
|
||||
env['ENABLE_VKBASALT'] = 1;
|
||||
env['VKBASALT_CONFIG_FILE'] = launcherShadersFile;
|
||||
|
||||
await Neutralino.filesystem.writeFile(launcherShadersFile, await Neutralino.filesystem.readFile(userShadersFile));
|
||||
if (shaders !== 'custom')
|
||||
{
|
||||
const userShadersFile = `${constants.paths.shadersDir}/public/${shaders}/vkBasalt.conf`;
|
||||
|
||||
await Neutralino.filesystem.writeFile(launcherShadersFile, await Neutralino.filesystem.readFile(userShadersFile));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue