diff --git a/docs/Changelog.md b/docs/Changelog.md index 2ee4d93..436363e 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -3,7 +3,7 @@ - Window size flicker issue fix when changing files. - Support input-builtin-bindings to make mp.add_key_binding behave same as in mpv. -- libmpv shinchiro 2021-10-10 +- libmpv shinchiro 2021-10-17 5.5.0.3 Beta (2021-09-23) diff --git a/src/Misc/CorePlayer.cs b/src/Misc/CorePlayer.cs index 9b7eeaf..d74b60d 100644 --- a/src/Misc/CorePlayer.cs +++ b/src/Misc/CorePlayer.cs @@ -1,7 +1,6 @@  using System; using System.Collections.Generic; -using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; @@ -153,7 +152,13 @@ namespace mpvnet SetPropertyBool("keep-open", true); SetPropertyBool("keep-open-pause", false); - SetInputBindingProperties(); + SetPropertyBool("input-default-bindings", true); + + try { + SetPropertyBool("input-builtin-bindings", false, true); + } catch { + SetPropertyBool("input-default-bindings", false); + } ProcessCommandLine(true); mpv_error err = mpv_initialize(Handle); @@ -170,30 +175,6 @@ namespace mpvnet InvokeAsync(InitializedAsync); } - void SetInputBindingProperties() - { - if (Debugger.IsAttached) - { - if (GetPropertyString("property-list").Contains("input-builtin-bindings")) - throw new Exception(); - else - SetPropertyBool("input-default-bindings", false); - } - else - { - SetPropertyBool("input-default-bindings", true); - - try - { - SetPropertyBool("input-builtin-bindings", false, true); - } - catch - { - SetPropertyBool("input-default-bindings", false); - } - } - } - void ApplyCompatibilityFixes() { if (!App.Settings.InputDefaultBindingsFixApplied)