From ca5b909379d6c4f4b0820ece0be3e2de62932ac7 Mon Sep 17 00:00:00 2001 From: Noethix55555 <277300782+Noethix55555@users.noreply.github.com> Date: Wed, 17 Jun 2026 20:14:41 -0400 Subject: [PATCH] fix: don't mark ShowMenuFix applied when input.conf is missing --- src/MpvNet/App.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MpvNet/App.cs b/src/MpvNet/App.cs index 4c98c379..a87b15fd 100644 --- a/src/MpvNet/App.cs +++ b/src/MpvNet/App.cs @@ -179,16 +179,16 @@ public void ApplyShowMenuFix() if (Settings.ShowMenuFixApplied) return; - if (File.Exists(InputConf.Path)) - { - string content = File.ReadAllText(InputConf.Path); + if (!File.Exists(InputConf.Path)) + return; - if (!content.Contains("script-message mpvnet show-menu") && - !content.Contains("script-message-to mpvnet show-menu")) + string content = File.ReadAllText(InputConf.Path); - File.WriteAllText(InputConf.Path, BR + content.Trim() + BR + - "MBTN_Right script-message-to mpvnet show-menu" + BR); - } + if (!content.Contains("script-message mpvnet show-menu") && + !content.Contains("script-message-to mpvnet show-menu")) + + File.WriteAllText(InputConf.Path, BR + content.Trim() + BR + + "MBTN_Right script-message-to mpvnet show-menu" + BR); Settings.ShowMenuFixApplied = true; }