/// <summary> /// /// </summary> /// <param name="model"></param> /// <param name="game"></param> private static void CreateDefaultSettingsFile(Model.Model model, GameInformation game) { if (game != null) { CemuSettings cs = new CemuSettings(model, game.GameSetting, game); cs.WriteSettingsBinFile(); WriteCemuHookIniFile.WriteIni(model, game); } }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <param name="fileName"></param> /// <param name="forceFullScreen"></param> internal void LaunchRpx(Model.Model model, string fileName, bool forceFullScreen = false) { makeBorderLess = false; string cemuExe = ""; var latest = model.Settings.InstalledVersions.FirstOrDefault(v => v.IsLatest); if (latest != null) { cemuExe = Path.Combine(latest.Folder, CemuFeatures.Cemu); } if (File.Exists(cemuExe)) { if (model.Settings.DisableShaderCache) { FileManager.DeleteShaderCache(latest); } CemuSettings cs = new CemuSettings(model, null, null); cs.WriteSettingsBinFile(); // Prepare the process to run ProcessStartInfo start = new ProcessStartInfo { Arguments = forceFullScreen ? "-f -g \"" + fileName + "\"" : "-g \"" + fileName + "\"", FileName = cemuExe, CreateNoWindow = true }; // Run the external process & wait for it to finish startTime = DateTime.Now; runningProcess = Process.Start(start); } else { MessageBox.Show(parent, Resources.Launcher_LaunchCemu_Please_install_CEMU, Resources.Launcher_LaunchCemu_CEMU_is_not_installed); if (parent != null) { parent.ProcessExited(); } } }