Added proper wine prefix usage in game starting

This commit is contained in:
Observer KRypt0n_ 2021-12-24 14:41:17 +02:00
parent 123db17f57
commit bd41bd1f46
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
2 changed files with 6 additions and 2 deletions

View file

@ -107,7 +107,7 @@ class Paths
*
* @default "~/.local/share/anime-game-launcher/game/drive_c/Program Files/[An Anime Game]"
*
* @returns "[constants.prefix.current]/drive_c/Program Files/[An Anime Game]"
* @returns "[constants.paths.prefix.current]/drive_c/Program Files/[An Anime Game]"
*/
public static get gameDir(): Promise<string>
{

View file

@ -105,7 +105,11 @@ export default (launcher: Launcher): Promise<void> => {
const startTime = Date.now();
const process = await Process.run(command, {
env: env,
env: {
...env,
WINEPREFIX: await constants.paths.prefix.current
},
cwd: await constants.paths.gameDir
});