mame: fix crash for view names containing commas
the way the initial lists are populated is kinda hacky because we need some separators and split the results using them. it's impossible to make sure they won't use that separator in a name in the future. maybe there's a better way than listing every available name in entire mame and finding which symbols never appear there and using them as separators (tho I admit for views I didn't even do that and relied on users running the thing).
This commit is contained in:
parent
38f8e3a9b4
commit
7a0c4d398f
|
@ -202,7 +202,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
|
|||
{
|
||||
if (View != string.Empty)
|
||||
{
|
||||
var substrings = View.Split(',');
|
||||
var substrings = View.Split('@');
|
||||
setting.Options.Add(substrings[1], substrings[1]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
|
|||
public const string GetViewsInfo =
|
||||
"local final = {} " +
|
||||
"for index, name in pairs(manager.machine.video.snapshot_target.view_names) do " +
|
||||
"table.insert(final, string.format(\"%s,%s;\", index, name)) " +
|
||||
"table.insert(final, string.format(\"%s@%s;\", index, name)) " +
|
||||
"end " +
|
||||
"table.sort(final) " +
|
||||
"return table.concat(final)";
|
||||
|
|
Loading…
Reference in New Issue