This commit is contained in:
Frank Skare
2021-06-20 11:11:51 +02:00
parent aa94da9767
commit 93f0c970da
3 changed files with 25 additions and 3 deletions

View File

@@ -346,8 +346,19 @@ namespace mpvnet
mpv_event evt = (mpv_event)Marshal.PtrToStructure(ptr, typeof(mpv_event));
if (WindowHandle == IntPtr.Zero)
{
WindowHandle = Native.FindWindowEx(MainForm.Hwnd, IntPtr.Zero, "mpv", null);
int GWL_STYLE = -16;
uint WS_CHILD = 0x40000000;
uint WS_VISIBLE = 0x10000000;
uint WS_DISABLED = 0x08000000;
uint WS_CLIPSIBLINGS = 0x04000000;
Native.SetWindowLong(WindowHandle, GWL_STYLE,
WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CLIPSIBLINGS);
}
try
{
switch (evt.event_id)

View File

@@ -61,9 +61,6 @@ namespace mpvnet
int hi = result >> 8;
int lo = result & 0xFF;
if (lo == -1 || hi == -1)
return;
vk = lo;
if ((hi & 1) == 1) mod |= KeyModifiers.Shift;