script-opts defaults

This commit is contained in:
stax76
2022-05-13 13:39:40 +02:00
parent a0d5a6f234
commit 2aec8856c7
2 changed files with 16 additions and 0 deletions

View File

@@ -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) 5.9.0.0 Beta (2022-05-08)
- Fix startup without media file not working with gpu-api=vulkan. - Fix startup without media file not working with gpu-api=vulkan.

View File

@@ -268,7 +268,19 @@ namespace mpvnet
_ConfigFolder = _ConfigFolder.AddSep(); _ConfigFolder = _ConfigFolder.AddSep();
if (!File.Exists(_ConfigFolder + "input.conf")) if (!File.Exists(_ConfigFolder + "input.conf"))
{
File.WriteAllText(_ConfigFolder + "input.conf", Properties.Resources.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; return _ConfigFolder;