Skip to content

Commit 94ecf4a

Browse files
committed
try fixing #662
1 parent 9355e2f commit 94ecf4a

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

docs/manual.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1093,11 +1093,11 @@ Cycles the deinterlace property using the following command:
10931093

10941094
Cycles the aspect ratio using the following command:
10951095

1096-
`cycle-values video-aspect 16:9 4:3 2.35:1 -1`
1096+
`cycle-values video-aspect-override 16:9 4:3 2.35:1 0 -1`
10971097

10981098
[cycle-values command](https://mpv.io/manual/master/#command-interface-cycle-values)
10991099

1100-
[video-aspect property](https://mpv.io/manual/master/#command-interface-video-aspect)
1100+
[video-aspect property](https://mpv.io/manual/master/#options-video-aspect-override)
11011101

11021102

11031103
### Audio > Next

src/MpvNet.Windows/WinForms/MainForm.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,12 @@ protected override void WndProc(ref Message m)
10461046
break;
10471047
case 0x319: // WM_APPCOMMAND
10481048
{
1049-
string? value = MpvHelp.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000));
1049+
string? key = MpvHelp.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000));
1050+
bool inputMediaKeys = Player.GetPropertyBool("input-media-keys");
10501051

1051-
if (value != null)
1052+
if (key != null && inputMediaKeys)
10521053
{
1053-
Player.Command("keypress " + value);
1054+
Player.Command("keypress " + key);
10541055
m.Result = new IntPtr(1);
10551056
return;
10561057
}

src/MpvNet/InputHelp.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static List<Binding> GetDefaults()
7979
new (_("Video"), _("Take Screenshot"), "async screenshot", "s"),
8080
new (_("Video"), _("Take Screenshot without subtitles"), "async screenshot video", "S"),
8181
new (_("Video"), _("Toggle Deinterlace"), "cycle deinterlace", "d"),
82-
new (_("Video"), _("Change Aspect Ratio"), "cycle-values video-aspect-override 16:9 4:3 2.35:1 -1", "a"),
82+
new (_("Video"), _("Change Aspect Ratio"), "cycle-values video-aspect-override 16:9 4:3 2.35:1 0 -1", "a"),
8383
new (_("Video"), _("Rotate Video"), "cycle-values video-rotate 90 180 270 0", "Ctrl+r"),
8484

8585
new (_("Audio"), _("Audio Device")),

src/MpvNet/Player.cs

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public void Init(IntPtr formHandle, bool processCommandLine)
102102

103103
SetPropertyBool("input-default-bindings", true);
104104
SetPropertyBool("input-builtin-bindings", false);
105+
SetPropertyBool("input-media-keys", true);
105106

106107
SetPropertyString("media-controls", "yes");
107108
SetPropertyString("idle", "yes");

0 commit comments

Comments
 (0)