From ed71cb704fed1d0f10c2429e90761a09de197d19 Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Sat, 11 May 2019 02:09:41 +0200 Subject: [PATCH] - --- README.md | 1 + mpv.net/Misc.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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(); }