diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.ISettable.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.ISettable.cs index 50295873a0..96c537efd1 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.ISettable.cs @@ -93,11 +93,11 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME }; var DIPSwitchOptions = MameGetString(MAMELuaCommand.GetDIPSwitchOptions(tag, fieldName)); - var options = DIPSwitchOptions.Split(new[] { '@' }, StringSplitOptions.RemoveEmptyEntries); + var options = DIPSwitchOptions.Split('\n'); if (options.Length is 0) continue; foreach (var option in options) { - var opt = option.Split(new[] { '~' }, StringSplitOptions.RemoveEmptyEntries); + var opt = option.Split('~'); setting.Options.Add(opt[0], opt[1]); } CurrentDriverSettings.Add(setting); diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs index 71616ec3dd..7da111e2dc 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs @@ -433,10 +433,10 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME public static string GetDIPSwitchOptions(string tag, string fieldName) => "local final = { } " + $"for value, description in pairs(manager.machine.ioport.ports[\"{ tag }\"].fields[\"{ fieldName }\"].settings) do " + - "table.insert(final, string.format(\"%d~%s@\", value, description)) " + + "table.insert(final, string.format(\"%d~%s\", value, description)) " + "end " + "table.sort(final) " + - "return table.concat(final)"; + "return table.concat(final, '\\n')"; public static string GetViewName(string index) => $"return manager.machine.video.snapshot_target.view_names[{ index }]"; }