From 0c3a03181afede7f4fbba0025aa51beaf512d9b4 Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Wed, 1 May 2019 10:07:01 +0200 Subject: [PATCH] - --- README.md | 52 ++++++++++++++++++++++++++++----------------- mpv.net/MainForm.cs | 13 ++++++------ 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 4f253b4..14e7f8f 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,27 @@ mpv.net is a modern media player for Windows that looks and works just like [mpv](https://mpv.io). -#### Based on libmpv +## Based on libmpv mpv.net is based on libmpv which offers a straightforward C API that was designed from the ground up to make mpv usable as a library and facilitate easy integration into other applications. -#### CLI options +## CLI options mpv.net has the same [CLI options](https://mpv.io/manual/master/#options) as mpv. -#### High quality video output +## High quality video output mpv/libmpv has an OpenGL based video output that is capable of many features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more. -#### On Screen Controller +## On Screen Controller mpv.net uses the OSC of mpv/libmpv offering play controls with a modern flat design. -#### GPU video decoding +## GPU video decoding mpv/libmpv leverages the FFmpeg hwaccel APIs to support DXVA2 video decoding acceleration. -#### Active development +## Active development mpv.net is under active development. Want a feature? Post a [patch](https://github.com/stax76/mpv.net/pulls) or [request it](https://github.com/stax76/mpv.net/issues)! @@ -57,41 +57,43 @@ Table of contents ### Screenshots -#### Main Window +#### Main Window Screenshot -![](https://raw.githubusercontent.com/stax76/mpv.net/master/img/Main.png) +![Main Window](https://raw.githubusercontent.com/stax76/mpv.net/master/img/Main.png) -#### Context Menu +#### Context Menu Screenshot Context menu defined in the input.conf file with dark mode support. -![](https://raw.githubusercontent.com/stax76/mpv.net/master/img/Menu.png) +![Context Menu](https://raw.githubusercontent.com/stax76/mpv.net/master/img/Menu.png) -#### Config Editor +#### Config Editor Screenshot A searchable config editor as alternative to edit the mpv.conf file manually. ![](https://raw.githubusercontent.com/stax76/mpv.net/master/img/ConfEditor.png) -#### Input Editor +#### Input Editor Screenshot A searchable key and mouse binding editor. -![](https://raw.githubusercontent.com/stax76/mpv.net/master/img/InputEditor.png) +![Input Editor](https://raw.githubusercontent.com/stax76/mpv.net/master/img/InputEditor.png) -#### Command Palette +#### Command Palette Screenshot Forgot where a command in the menu is located or what shortcut key it has? Just press Ctrl+Shift+P and find it easily in the searchable command palette. -![](https://raw.githubusercontent.com/stax76/mpv.net/master/img/CommandPalette.png) +![Command Palette](https://raw.githubusercontent.com/stax76/mpv.net/master/img/CommandPalette.png) ### Context Menu The context menu can be customized via input.conf file located at: -``` + +```Text C:\Users\%username%\AppData\Roaming\mpv\input.conf ``` + if it's missing mpv.net generates it with the following defaults: @@ -101,13 +103,17 @@ input.conf defines mpv's key and mouse bindings and mpv.net uses comments to def ### Settings mpv.net shares the settings with mpv, settings can be edited in a settings dialog or in a config file called mpv.conf located at: -``` + +```Text C:\Users\%username%\AppData\Roaming\mpv\mpv.conf ``` -or alternativly at: -``` + +or in a portable setup at: + +```Text \portable_config\mpv.conf ``` + if it's missing mpv.net generates it with the following defaults: @@ -122,9 +128,15 @@ Scripting is supported via Python, C#, Lua, JavaScript and PowerShell Add-ons have to be located at: +```Text C:\Users\%username%\AppData\Roaming\mpv\Addons\ExampleAddon\ExampleAddon.dll +``` -\\portable_config\Addons\ExampleAddon\ExampleAddon.dll +or in a portable setup at: + +```Text +\portable_config\Addons\ExampleAddon\ExampleAddon.dll +``` The add-on filename must end with 'Addon.dll'. diff --git a/mpv.net/MainForm.cs b/mpv.net/MainForm.cs index 93ebdc7..e2f1de9 100644 --- a/mpv.net/MainForm.cs +++ b/mpv.net/MainForm.cs @@ -41,13 +41,6 @@ namespace mpvnet try { - object recent = RegistryHelp.GetObject("HKCU\\Software\\" + Application.ProductName, "Recent"); - - if (recent is string[]) - RecentFiles = new List((string[])recent); - else - RecentFiles = new List(); - AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Application.ThreadException += Application_ThreadException; Msg.SupportURL = "https://github.com/stax76/mpv.net#support"; @@ -58,6 +51,12 @@ namespace mpvnet MinimumSize = new Size(FontHeight * 16, FontHeight * 9); Text += " " + Application.ProductVersion; + object recent = RegistryHelp.GetObject("HKCU\\Software\\" + Application.ProductName, "Recent"); + + if (recent is string[] r) + RecentFiles = new List(r); + else + RecentFiles = new List(); foreach (var i in mp.mpvConf) ProcessMpvProperty(i.Key, i.Value);