mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
Small fix for win32 VST hosting keyboard hooks.
This commit is contained in:
parent
4a37aa0585
commit
993d4a6e59
1 changed files with 5 additions and 3 deletions
|
|
@ -2233,10 +2233,11 @@ private:
|
|||
#pragma warning (push)
|
||||
#pragma warning (disable: 4244)
|
||||
|
||||
originalWndProc = (void*) GetWindowLongPtr (pluginHWND, GWLP_WNDPROC);
|
||||
|
||||
if (! pluginWantsKeys)
|
||||
{
|
||||
originalWndProc = (void*) GetWindowLongPtr (pluginHWND, GWLP_WNDPROC);
|
||||
SetWindowLongPtr (pluginHWND, GWLP_WNDPROC, (LONG_PTR) vstHookWndProc);
|
||||
}
|
||||
|
||||
#pragma warning (pop)
|
||||
|
||||
|
|
@ -2326,10 +2327,11 @@ private:
|
|||
#if JUCE_WINDOWS
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4244)
|
||||
if (pluginHWND != 0 && IsWindow (pluginHWND))
|
||||
if (originalWndProc != 0 && pluginHWND != 0 && IsWindow (pluginHWND))
|
||||
SetWindowLongPtr (pluginHWND, GWLP_WNDPROC, (LONG_PTR) originalWndProc);
|
||||
#pragma warning (pop)
|
||||
|
||||
originalWndProc = 0;
|
||||
pluginHWND = 0;
|
||||
#elif JUCE_LINUX
|
||||
pluginWindow = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue