Skip to content

Commit

Permalink
Document Michael's changes adding TranslateMessage() back to the SDL …
Browse files Browse the repository at this point in the history
…message loop.
  • Loading branch information
slouken committed Jan 30, 2014
1 parent 5c58bd6 commit dbd4a91
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/video/windows/SDL_windowsevents.c
Expand Up @@ -550,6 +550,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
returnCode = 0;
break;

case WM_UNICHAR:
case WM_CHAR:
/* Ignore WM_CHAR messages that come from TranslateMessage(), since we handle WM_KEY* messages directly */
returnCode = 0;
break;

#ifdef WM_INPUTLANGCHANGE
case WM_INPUTLANGCHANGE:
{
Expand Down Expand Up @@ -848,7 +854,8 @@ WIN_PumpEvents(_THIS)
const Uint8 *keystate;
MSG msg;
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
/* Always translate the message in case it's a non-SDL window (e.g. with Qt integration) */
TranslateMessage(&msg);
DispatchMessage(&msg);
}

Expand Down

0 comments on commit dbd4a91

Please sign in to comment.