diff --git a/README.md b/README.md index b2de39a..acf79b8 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ mpv.net bugs and requests: ### 3.6 (2019-??-??) - playing files from rar archives caused an exception +- there was a bug that caused underscores beeing removed from input like MBTN_LEFT_DBL ### 3.5 (2019-05-09) diff --git a/mpv.net/Misc.cs b/mpv.net/Misc.cs index 4673e91..dfd920d 100644 --- a/mpv.net/Misc.cs +++ b/mpv.net/Misc.cs @@ -210,14 +210,14 @@ namespace mpvnet if (val.StartsWith("#")) continue; if (!val.Contains(" ")) continue; CommandItem item = new CommandItem(); - item.Input = val.Substring(0, val.IndexOf(" ")).Replace("_", ""); + item.Input = val.Substring(0, val.IndexOf(" ")); + if (item.Input == "_") item.Input = ""; val = val.Substring(val.IndexOf(" ") + 1); if (val.Contains("#menu:")) { item.Path = val.Substring(val.IndexOf("#menu:") + 6).Trim(); val = val.Substring(0, val.IndexOf("#menu:")); - if (item.Path.Contains(";")) item.Path = item.Path.Substring(item.Path.IndexOf(";") + 1).Trim(); }