diff --git a/docs/Changelog.md b/docs/Changelog.md index f21ad62..afb7cad 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,4 +1,8 @@ +- When input.conf is created on the very first start and + a script-opts folder does not exist, a script-opts folder is + created with defaults for osc and console. + 5.9.0.0 Beta (2022-05-08) - Fix startup without media file not working with gpu-api=vulkan. diff --git a/src/Misc/Player.cs b/src/Misc/Player.cs index 83caaac..e0e130d 100644 --- a/src/Misc/Player.cs +++ b/src/Misc/Player.cs @@ -268,7 +268,19 @@ namespace mpvnet _ConfigFolder = _ConfigFolder.AddSep(); if (!File.Exists(_ConfigFolder + "input.conf")) + { File.WriteAllText(_ConfigFolder + "input.conf", Properties.Resources.input_conf); + + string scriptOptsPath = _ConfigFolder + "script-opts" + Path.DirectorySeparatorChar; + + if (!Directory.Exists(scriptOptsPath)) + { + Directory.CreateDirectory(scriptOptsPath); + File.WriteAllText(scriptOptsPath + "console.conf", BR + "scale=1.5" + BR); + string content = BR + "scalewindowed=1.5" + BR + "hidetimeout=2000" + BR; + File.WriteAllText(scriptOptsPath + "osc.conf", content); + } + } } return _ConfigFolder;