This commit is contained in:
Frank Skare
2019-04-24 23:59:34 +02:00
parent 3e70e8e5ea
commit 8f7aa7db2d
5 changed files with 31 additions and 18 deletions

View File

@@ -78,7 +78,8 @@ namespace mpvnet
string portableFolder = Application.StartupPath + "\\portable_config\\";
string appdataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\";
if (!Directory.Exists(portableFolder) && !Directory.Exists(appdataFolder))
if (!Directory.Exists(appdataFolder) && !Directory.Exists(portableFolder) &&
Sys.IsDirectoryWritable(Application.StartupPath))
{
using (TaskDialog<string> td = new TaskDialog<string>())
{
@@ -312,11 +313,11 @@ namespace mpvnet
break;
case mpv_event_id.MPV_EVENT_PLAYBACK_RESTART:
PlaybackRestart?.Invoke();
Size s = new Size(get_property_int("dwidth"), get_property_int("dheight"));
Size vidSize = new Size(get_property_int("dwidth"), get_property_int("dheight"));
if (VideoSize != s && s != Size.Empty)
if (VideoSize != vidSize && vidSize != Size.Empty)
{
VideoSize = s;
VideoSize = vidSize;
VideoSizeChanged?.Invoke();
}