From b643823d6056ba6e25c45d6cf5b958e0c23c599c Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Wed, 5 Jan 2022 19:36:48 +0200 Subject: [PATCH] Fixed DXVK applying and hot cache resolving issues --- src/ts/core/Cache.ts | 5 ++++- src/ts/core/DXVK.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ts/core/Cache.ts b/src/ts/core/Cache.ts index ff1c23b..5c6760f 100644 --- a/src/ts/core/Cache.ts +++ b/src/ts/core/Cache.ts @@ -33,7 +33,10 @@ export default class Cache ] }); - resolve(this.cache[name]); + resolve({ + expired: this.cache[name].ttl !== null ? Date.now() > this.cache[name].ttl * 1000 : false, + value: this.cache[name].value + }); } else Neutralino.filesystem.readFile(await constants.paths.cache) diff --git a/src/ts/core/DXVK.ts b/src/ts/core/DXVK.ts index f912779..a2b5b4e 100644 --- a/src/ts/core/DXVK.ts +++ b/src/ts/core/DXVK.ts @@ -182,7 +182,7 @@ export default class DXVK * And then run it */ (): Promise => new Promise(async (resolve) => { - const alias = runner ? `alias winecfg="${runnerDir}/${runner.files.winecfg}"\\n` : ''; + const alias = runner ? `alias winecfg="${runnerDir}/${runner.files.winecfg}"\n` : ''; Process.run(`eval $'${alias}./setup_dxvk.sh install'`, { cwd: dxvkDir,