mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-06 06:54:29 +00:00
Work around bug where key after ALT+ENTER was getting swallowed.
This commit is contained in:
parent
65bdea5638
commit
62f782469e
10
src/3rdparty/win32_src/pdcurses/pdcscrn.c
vendored
10
src/3rdparty/win32_src/pdcurses/pdcscrn.c
vendored
@ -1602,6 +1602,7 @@ static void HandlePaint( HWND hwnd )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool key_already_handled = FALSE;
|
static bool key_already_handled = FALSE;
|
||||||
|
static int last_key_handled = 0;
|
||||||
|
|
||||||
static void HandleSyskeyDown( const WPARAM wParam, const LPARAM lParam,
|
static void HandleSyskeyDown( const WPARAM wParam, const LPARAM lParam,
|
||||||
int *ptr_modified_key_to_return )
|
int *ptr_modified_key_to_return )
|
||||||
@ -1666,10 +1667,12 @@ static void HandleSyskeyDown( const WPARAM wParam, const LPARAM lParam,
|
|||||||
{
|
{
|
||||||
add_key_to_queue( key);
|
add_key_to_queue( key);
|
||||||
if (wParam == VK_MULTIPLY || wParam == VK_DIVIDE
|
if (wParam == VK_MULTIPLY || wParam == VK_DIVIDE
|
||||||
|| wParam == VK_ADD || wParam == VK_SUBTRACT)
|
|| wParam == VK_ADD || wParam == VK_SUBTRACT
|
||||||
//|| wParam == VK_RETURN)
|
|| wParam == VK_RETURN) {
|
||||||
|
last_key_handled = key;
|
||||||
key_already_handled = TRUE;
|
key_already_handled = TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pdc_key_modifiers = 0;
|
pdc_key_modifiers = 0;
|
||||||
/* Save the key modifiers if required. Do this first to allow to
|
/* Save the key modifiers if required. Do this first to allow to
|
||||||
detect e.g. a pressed CTRL key after a hit of NUMLOCK. */
|
detect e.g. a pressed CTRL key after a hit of NUMLOCK. */
|
||||||
@ -2006,9 +2009,10 @@ static LRESULT ALIGN_STACK CALLBACK WndProc (const HWND hwnd,
|
|||||||
|
|
||||||
case WM_CHAR: /* _Don't_ add Shift-Tab; it's handled elsewhere */
|
case WM_CHAR: /* _Don't_ add Shift-Tab; it's handled elsewhere */
|
||||||
if( wParam != 9 || !(GetKeyState( VK_SHIFT) & 0x8000))
|
if( wParam != 9 || !(GetKeyState( VK_SHIFT) & 0x8000))
|
||||||
if( !key_already_handled)
|
if( !key_already_handled || last_key_handled != (int)wParam )
|
||||||
add_key_to_queue( (int)wParam );
|
add_key_to_queue( (int)wParam );
|
||||||
key_already_handled = FALSE;
|
key_already_handled = FALSE;
|
||||||
|
last_key_handled = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
|
Loading…
Reference in New Issue
Block a user