fix: Issues with launching and installation on the steam deck
This commit is contained in:
parent
dc0f2d150a
commit
ccc5a05ed7
19 changed files with 247 additions and 80 deletions
|
|
@ -41,7 +41,13 @@ export default class PCSX2Integration implements PluginType
|
|||
|
||||
await Promise.all(Object.values(view).map(p => ensureDir(p)));
|
||||
|
||||
await Bun.write(path.join(ctx.autoValidCommand.metadata.emulatorDir, 'inis', 'PCSX2.ini'), Mustache.render(configFileContents, view));
|
||||
let pscx2Path = '';
|
||||
if (process.platform === 'win32')
|
||||
pscx2Path = path.join(ctx.autoValidCommand.metadata.emulatorDir, 'inis');
|
||||
else
|
||||
pscx2Path = path.join(ctx.autoValidCommand.metadata.emulatorDir, "PCSX2", 'inis');
|
||||
|
||||
await Bun.write(path.join(pscx2Path, 'PCSX2.ini'), Mustache.render(configFileContents, view));
|
||||
|
||||
return args;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import configControlsFilePathLinux from './linux/controls.ini' with { type: 'fil
|
|||
import path from "node:path";
|
||||
import Mustache from "mustache";
|
||||
import { ensureDir } from "fs-extra";
|
||||
import { homedir } from "node:os";
|
||||
|
||||
export default class PCSX2Integration implements PluginType
|
||||
{
|
||||
|
|
@ -38,13 +39,29 @@ export default class PCSX2Integration implements PluginType
|
|||
break;
|
||||
}
|
||||
|
||||
let ppssppPath = '';
|
||||
if (process.platform === 'win32')
|
||||
{
|
||||
ppssppPath = path.join(ctx.autoValidCommand.metadata.emulatorDir, 'memstick', 'PSP', 'SYSTEM');
|
||||
} else
|
||||
{
|
||||
//TODO: Use way to set custom memstick path when they support it
|
||||
ensureDir(path.join(homedir(), '.config', 'ppsspp'));
|
||||
ppssppPath = path.join(homedir(), '.config', 'ppsspp', 'PSP', 'SYSTEM');
|
||||
}
|
||||
|
||||
ensureDir(ppssppPath);
|
||||
|
||||
if (confPath)
|
||||
{
|
||||
const configFileContents = await Bun.file(confPath).text();
|
||||
await Bun.write(path.join(ppssppPath, 'ppsspp.ini'), Mustache.render(configFileContents, {}));
|
||||
}
|
||||
|
||||
if (controlsPath)
|
||||
{
|
||||
const configFileContents = await Bun.file(controlsPath).text();
|
||||
const controlsFileContents = await Bun.file(controlsPath).text();
|
||||
ensureDir(path.join(ctx.autoValidCommand.metadata.emulatorDir, 'memstick', 'PSP', 'SYSTEM'));
|
||||
await Bun.write(path.join(ctx.autoValidCommand.metadata.emulatorDir, 'memstick', 'PSP', 'SYSTEM', 'ppsspp.ini'), Mustache.render(configFileContents, {}));
|
||||
await Bun.write(path.join(ctx.autoValidCommand.metadata.emulatorDir, 'memstick', 'PSP', 'SYSTEM', 'controls.ini'), Mustache.render(controlsFileContents, {}));
|
||||
await Bun.write(path.join(ppssppPath, 'controls.ini'), Mustache.render(controlsFileContents, {}));
|
||||
}
|
||||
|
||||
return args;
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ export default class RommIntegration implements PluginType
|
|||
const file: DownloadFileEntry = {
|
||||
url: new URL(`${config.get('rommAddress')}/api/romsfiles/${f.id}/content/${f.file_name}`),
|
||||
file_name: f.file_name,
|
||||
file_path: path.join(config.get('downloadPath'), f.file_path),
|
||||
file_path: f.file_path,
|
||||
size: f.file_size_bytes,
|
||||
sha1: f.sha1_hash ?? undefined
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue