feat: Implemented dolphin integration
This commit is contained in:
parent
edbc390d14
commit
a69147a4f7
24 changed files with 220 additions and 59 deletions
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
import { config, db } from "@/bun/api/app";
|
||||
import { PluginContextType, PluginType } from "@/bun/types/typesc.schema";
|
||||
import path from 'node:path';
|
||||
import desc from './package.json';
|
||||
|
||||
export default class DOLPHINIntegration implements PluginType
|
||||
{
|
||||
load (ctx: PluginContextType)
|
||||
{
|
||||
ctx.hooks.games.emulatorLaunchSupport.tap(desc.name, (ctx) =>
|
||||
{
|
||||
if (ctx.emulator === 'DOLPHIN')
|
||||
return { id: desc.name, possible: !!ctx.source };
|
||||
});
|
||||
|
||||
ctx.hooks.games.emulatorLaunch.tapPromise(desc.name, async (ctx) =>
|
||||
{
|
||||
if (ctx.autoValidCommand.emulator === 'DOLPHIN' && ctx.autoValidCommand.metadata.emulatorDir)
|
||||
{
|
||||
const args = ["--batch"];
|
||||
|
||||
const storageFolder = path.join(config.get('downloadPath'), "saves", 'DOLPHIN');
|
||||
|
||||
args.push(...[`--user=${storageFolder}`, `--exec=${ctx.autoValidCommand.metadata.romPath}`]);
|
||||
args.push(`--config=Dolphin.Display.Fullscreen=${config.get('launchInFullscreen') ? "True" : "False"}`);
|
||||
args.push(`--config=Dolphin.General.ISOPath0=${path.join(config.get('downloadPath'), 'roms', 'gc')}`);
|
||||
args.push(`--config=Dolphin.General.ISOPath1=${path.join(config.get('downloadPath'), 'roms', 'wii')}`);
|
||||
args.push(`--config=Dolphin.Interface.ConfirmStop=False`);
|
||||
args.push(`--config=Dolphin.Interface.SkipNKitWarning=True`);
|
||||
args.push(`--config=Dolphin.Analytics.PermissionAsked=True`);
|
||||
|
||||
return args;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "com.simeonradivoev.gameflow.dolphin",
|
||||
"displayName": "DOLPHIN Integration",
|
||||
"version": "0.0.1",
|
||||
"description": "DOLPHIN Emulator Integration",
|
||||
"main": "./dolphin.ts",
|
||||
"icon": "https://upload.wikimedia.org/wikipedia/commons/5/53/Dolphin_Emulator_Logo_Refresh.svg",
|
||||
"keywords": [
|
||||
"integration",
|
||||
"emulator",
|
||||
"wiiu",
|
||||
"gc",
|
||||
"dolphin"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue