Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-08 09:11:45 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-08 09:11:45 +0300
commitafb1d8a8b5fde2e4d49ad9c42e29d64f65074718 (patch)
tree2850253e4619bb8758a74b059682e39ef8b7ab5f /WorkerForm.cs
parenta2f31929bcbfe91b3dade80e0f7b63ca3a3adb9d (diff)
Tiny but important fix for Super Famicom
Diffstat (limited to 'WorkerForm.cs')
-rw-r--r--WorkerForm.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/WorkerForm.cs b/WorkerForm.cs
index 032bf92f..ed5e16b5 100644
--- a/WorkerForm.cs
+++ b/WorkerForm.cs
@@ -131,12 +131,16 @@ namespace com.clusterrr.hakchi_gui
"5296e64818bf2d1dbdc6b594f3eefd17", // SNES Mini (USA)
"228967ab1035a347caa9c880419df487", // SNES Mini (USA)
};
- correctKernels[MainForm.ConsoleType.SuperFamicom] = new string[]
+ correctKernels[MainForm.ConsoleType.SuperFamicom] = new string[]
{
"632e179db63d9bcd42281f776a030c14", // Super Famicom Mini (JAP)
};
- correctKeys[MainForm.ConsoleType.NES] = new string[] { "bb8f49e0ae5acc8d5f9b7fa40efbd3e7" };
- correctKeys[MainForm.ConsoleType.SNES] = new string[] { "c5dbb6e29ea57046579cfd50b124c9e1" };
+ correctKeys[MainForm.ConsoleType.NES] =
+ correctKeys[MainForm.ConsoleType.Famicom] =
+ new string[] { "bb8f49e0ae5acc8d5f9b7fa40efbd3e7" };
+ correctKeys[MainForm.ConsoleType.SNES] =
+ correctKeys[MainForm.ConsoleType.SuperFamicom] =
+ new string[] { "c5dbb6e29ea57046579cfd50b124c9e1" };
}
public DialogResult Start()
@@ -454,9 +458,8 @@ namespace com.clusterrr.hakchi_gui
var matchedKeys = from k in correctKeys where k.Value.Contains(keyhash) select k.Key;
if (matchedKeys.Count() > 0)
{
- var console = matchedKeys.First();
- if (console != ConfigIni.ConsoleType)
- throw new Exception(Resources.InvalidConsoleSelected + " " + console);
+ if (!matchedKeys.Contains(ConfigIni.ConsoleType))
+ throw new Exception(Resources.InvalidConsoleSelected + " " + matchedKernels.First());
}
else throw new Exception("Unknown key, unknown console");
@@ -472,9 +475,8 @@ namespace com.clusterrr.hakchi_gui
else
{
// Lets try to autodetect console using kernel hash
- var console = matchedKernels.First();
- if (console != ConfigIni.ConsoleType)
- throw new Exception(Resources.InvalidConsoleSelected + " " + console);
+ if (!matchedKernels.Contains(ConfigIni.ConsoleType))
+ throw new Exception(Resources.InvalidConsoleSelected + " " + matchedKernels.First());
}
Directory.CreateDirectory(Path.GetDirectoryName(KernelDumpPath));