public override System.Diagnostics.ProcessStartInfo Generate(string system, string emulator, string core, string rom, string playersControllers, ScreenResolution resolution) { string folderName = (emulator == "dolphin-triforce" || core == "dolphin-triforce" || emulator == "triforce" || core == "triforce") ? "dolphin-triforce" : "dolphin"; string path = AppConfig.GetFullPath(folderName); if (string.IsNullOrEmpty(path)) { path = AppConfig.GetFullPath("dolphin"); } if (string.IsNullOrEmpty(path)) { path = AppConfig.GetFullPath("dolphin-emu"); } string exe = Path.Combine(path, "Dolphin.exe"); if (!File.Exists(exe)) { _triforce = true; exe = Path.Combine(path, "DolphinWX.exe"); } if (!File.Exists(exe)) { return(null); } string portableFile = Path.Combine(path, "portable.txt"); if (!File.Exists(portableFile)) { File.WriteAllText(portableFile, ""); } if ((system == "gamecube" && SystemConfig["ratio"] == "") || SystemConfig["ratio"] == "4/3") { _bezelFileInfo = BezelFiles.GetBezelFiles(system, rom, resolution); } _resolution = resolution; SetupGeneralConfig(path, system); SetupGfxConfig(path); DolphinControllers.WriteControllersConfig(path, system, rom); return(new ProcessStartInfo() { FileName = exe, Arguments = "-b -e \"" + rom + "\"", WorkingDirectory = path, WindowStyle = (_bezelFileInfo == null ? ProcessWindowStyle.Normal : ProcessWindowStyle.Maximized) }); }
public override System.Diagnostics.ProcessStartInfo Generate(string system, string emulator, string core, string rom, string playersControllers, ScreenResolution resolution) { string folderName = (emulator == "dolphin-triforce" || core == "dolphin-triforce" || emulator == "triforce" || core == "triforce") ? "dolphin-triforce" : "dolphin"; string path = AppConfig.GetFullPath(folderName); if (string.IsNullOrEmpty(path)) { path = AppConfig.GetFullPath("dolphin"); } if (string.IsNullOrEmpty(path)) { path = AppConfig.GetFullPath("dolphin-emu"); } string exe = Path.Combine(path, "Dolphin.exe"); if (!File.Exists(exe)) { _triforce = true; exe = Path.Combine(path, "DolphinWX.exe"); } if (!File.Exists(exe)) { return(null); } string portableFile = Path.Combine(path, "portable.txt"); if (!File.Exists(portableFile)) { File.WriteAllText(portableFile, ""); } SetupGeneralConfig(path, system); SetupGfxConfig(path); DolphinControllers.WriteControllersConfig(path, system, rom); return(new ProcessStartInfo() { FileName = exe, Arguments = "-b -e \"" + rom + "\"", WorkingDirectory = path, }); }