misc
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user