Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Fix linux filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
CapitaineJSparrow committed Oct 4, 2021
1 parent 67c16d4 commit 4c6b2e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/service/Ryujinx/shaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const displayShadersErrorOnDownload = () => {

export const installShadersToGame = async (config: IRyujinxConfig, titleId: string) => {
progressEvent.dispatchEvent(new CustomEvent('progress', { detail: { progress: 0, open: true, downloadSpeed: 0 }}))
const shaderDestPath = getRyujinxPath(config, 'games', titleId, 'cache', 'shader', 'guest', 'program', 'cache.zip');
const infoDestPath = getRyujinxPath(config, 'games', titleId, 'cache', 'shader', 'guest', 'program', 'cache.info');
const shaderDestPath = getRyujinxPath(config, 'games', titleId.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.zip');
const infoDestPath = getRyujinxPath(config, 'games', titleId.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.info');

const exists = await fs.promises.access(infoDestPath).then(() => true).catch(() => false);

Expand All @@ -60,7 +60,7 @@ export const installShadersToGame = async (config: IRyujinxConfig, titleId: stri
}

// Clear compiled Shaders to avoid cache collision issue
rimraf(getRyujinxPath(config, 'games', titleId, 'cache', 'shader', 'opengl'), () => {});
rimraf(getRyujinxPath(config, 'games', titleId.toLowerCase(), 'cache', 'shader', 'opengl'), () => {});
await fs.writeFileSync(infoDestPath, arrayBufferToBuffer(buffer));

return Swal.fire({
Expand All @@ -70,8 +70,8 @@ export const installShadersToGame = async (config: IRyujinxConfig, titleId: stri
};

export const packShaders = async (config: IRyujinxConfig, titleID: string): Promise<any> => {
const shaderZipPath = getRyujinxPath(config, 'games', titleID, 'cache', 'shader', 'guest', 'program', 'cache.zip');
const shaderInfoPath = getRyujinxPath(config, 'games', titleID, 'cache', 'shader', 'guest', 'program', 'cache.info');
const shaderZipPath = getRyujinxPath(config, 'games', titleID.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.zip');
const shaderInfoPath = getRyujinxPath(config, 'games', titleID.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.info');
const archive = new zip();
archive.addLocalFile(shaderZipPath);
archive.addLocalFile(shaderInfoPath);
Expand Down

0 comments on commit 4c6b2e8

Please sign in to comment.