From 3f52a20c907ca66aa4a88ecb787ca01c97cb5073 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 10 Feb 2022 11:52:13 -0800 Subject: [PATCH] Add /mr default flag options (fixes #360) --- CHANGELIST.md | 1 + MPF.Core/Data/Options.cs | 18 ++++++++++++++++++ MPF.Modules/DiscImageCreator/Parameters.cs | 3 +++ MPF/Windows/OptionsWindow.xaml | 14 +++++++++++++- 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 3e39facc..76e69b70 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -1,6 +1,7 @@ ### WIP (xxxx-xx-xx) - Update to DIC 20211001 - Fix Redump disc title pulling +- Add /mr default flag options ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF.Core/Data/Options.cs b/MPF.Core/Data/Options.cs index 7622d6ca..350753fa 100644 --- a/MPF.Core/Data/Options.cs +++ b/MPF.Core/Data/Options.cs @@ -198,6 +198,24 @@ namespace MPF.Core.Data #region DiscImageCreator + /// + /// Enable multi-sector read flag by default + /// + public bool DICMultiSectorRead + { + get { return GetBooleanSetting(_settings, "DICMultiSectorRead", false); } + set { _settings["DICMultiSectorRead"] = value.ToString(); } + } + + /// + /// Include a default multi-sector read value + /// + public int DICMultiSectorReadValue + { + get { return GetInt32Setting(_settings, "DICMultiSectorReadValue", 0); } + set { _settings["DICMultiSectorRead"] = value.ToString(); } + } + /// /// Enable overly-secure dumping flags by default /// diff --git a/MPF.Modules/DiscImageCreator/Parameters.cs b/MPF.Modules/DiscImageCreator/Parameters.cs index 26cfbc18..ead88379 100644 --- a/MPF.Modules/DiscImageCreator/Parameters.cs +++ b/MPF.Modules/DiscImageCreator/Parameters.cs @@ -1655,6 +1655,9 @@ namespace MPF.Modules.DiscImageCreator { case MediaType.CDROM: this[FlagStrings.C2Opcode] = true; + this[FlagStrings.MultiSectorRead] = options.DICMultiSectorRead; + if (options.DICMultiSectorRead) + this.MultiSectorReadValue = options.DICMultiSectorReadValue; switch (this.System) { diff --git a/MPF/Windows/OptionsWindow.xaml b/MPF/Windows/OptionsWindow.xaml index b42fe9b7..42ea2e40 100644 --- a/MPF/Windows/OptionsWindow.xaml +++ b/MPF/Windows/OptionsWindow.xaml @@ -300,7 +300,7 @@ - + + +