From 47a81e7b204c5fa1b5574b3670d81d3e13867ca2 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Mon, 13 Dec 2021 18:26:25 -0800 Subject: [PATCH] fix dsm importing, apparently desmume inverts the order of start/select for dumping/parsing --- .../movie/import/DsmImport.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/BizHawk.Client.Common/movie/import/DsmImport.cs b/src/BizHawk.Client.Common/movie/import/DsmImport.cs index 3f8d233414..4c0a9b694a 100644 --- a/src/BizHawk.Client.Common/movie/import/DsmImport.cs +++ b/src/BizHawk.Client.Common/movie/import/DsmImport.cs @@ -88,7 +88,7 @@ namespace BizHawk.Client.Common Result.Movie.HeaderEntries[HeaderKeys.Core] = CoreNames.MelonDS; } - private readonly string[] _buttons = { "Left", "Right", "Up", "Down", "A", "B", "X", "Y", "L", "R", "Start", "Select" }; + private readonly string[] _buttons = { "Right", "Left", "Down", "Up", "Start", "Select", "B", "A", "Y", "X", "L", "R", }; private void ImportInputFrame(string line) { @@ -108,18 +108,18 @@ namespace BizHawk.Client.Common { var mnemonics = sections[1].Take(_buttons.Length).ToList(); - controller["Left"] = mnemonics[1] != '.'; controller["Right"] = mnemonics[0] != '.'; - controller["Up"] = mnemonics[3] != '.'; + controller["Left"] = mnemonics[1] != '.'; controller["Down"] = mnemonics[2] != '.'; - controller["A"] = mnemonics[7] != '.'; + controller["Up"] = mnemonics[3] != '.'; + controller["Start"] = mnemonics[5] != '.'; // shoutouts to desmume doing start/select as select/start countary to docs + controller["Select"] = mnemonics[4] != '.'; controller["B"] = mnemonics[6] != '.'; - controller["X"] = mnemonics[9] != '.'; + controller["A"] = mnemonics[7] != '.'; controller["Y"] = mnemonics[8] != '.'; + controller["X"] = mnemonics[9] != '.'; controller["L"] = mnemonics[10] != '.'; controller["R"] = mnemonics[11] != '.'; - controller["Start"] = mnemonics[4] != '.'; - controller["Select"] = mnemonics[5] != '.'; controller["Touch"] = sections[1].Substring(21, 1) != "0";