mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-30 05:28:15 +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
|
@ -108,3 +108,4 @@ settings:
|
|||
tooltip: Benutze die Home/POS1 taste um die Shader in-spiel zu togglen
|
||||
items:
|
||||
none: None
|
||||
custom: Custom
|
|
@ -107,3 +107,4 @@ settings:
|
|||
tooltip: Use Home button to toggle shaders in the game
|
||||
items:
|
||||
none: None
|
||||
custom: Custom
|
|
@ -106,3 +106,4 @@ settings:
|
|||
tooltip: Используйте кнопку Home чтобы переключать шейдеры в игре
|
||||
items:
|
||||
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,14 +77,18 @@ 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;
|
||||
|
||||
if (shaders !== 'custom')
|
||||
{
|
||||
const userShadersFile = `${constants.paths.shadersDir}/public/${shaders}/vkBasalt.conf`;
|
||||
|
||||
await Neutralino.filesystem.writeFile(launcherShadersFile, await Neutralino.filesystem.readFile(userShadersFile));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* GPU selection
|
||||
|
|
Loading…
Reference in a new issue