Commit b613ffc4 authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #634

If TranslateMessage() isn't done, then IME messages aren't generated.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404005
parent f0c110f7
...@@ -198,7 +198,7 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar ...@@ -198,7 +198,7 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
m.wParam = wParam; m.wParam = wParam;
m.lParam = lParam; m.lParam = lParam;
m.time = 0; m.time = 0;
if ( TranslateMessage(&m) && PeekMessage(&m, hwnd, 0, WM_USER, PM_NOREMOVE) && (m.message == WM_CHAR) ) { if ( PeekMessage(&m, hwnd, 0, WM_USER, PM_NOREMOVE) && (m.message == WM_CHAR) ) {
GetMessage(&m, hwnd, 0, WM_USER); GetMessage(&m, hwnd, 0, WM_USER);
wParam = m.wParam; wParam = m.wParam;
} }
...@@ -363,6 +363,7 @@ void DIB_PumpEvents(_THIS) ...@@ -363,6 +363,7 @@ void DIB_PumpEvents(_THIS)
while ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { while ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
if ( GetMessage(&msg, NULL, 0, 0) > 0 ) { if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
} }
} }
......
...@@ -655,6 +655,7 @@ static int DX5_CheckInput(_THIS, int timeout, BOOL processInput) ...@@ -655,6 +655,7 @@ static int DX5_CheckInput(_THIS, int timeout, BOOL processInput)
while ( ! posted && while ( ! posted &&
PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
if ( GetMessage(&msg, NULL, 0, 0) > 0 ) { if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
} else { } else {
return(-1); return(-1);
...@@ -713,12 +714,17 @@ static int DX5_CheckInput(_THIS, int timeout, BOOL processInput) ...@@ -713,12 +714,17 @@ static int DX5_CheckInput(_THIS, int timeout, BOOL processInput)
} }
if ( event != WAIT_TIMEOUT ) { if ( event != WAIT_TIMEOUT ) {
/* Maybe there was a windows message? */ /* Maybe there was a windows message? */
if ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { posted = 0;
while ( ! posted &&
PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
if ( GetMessage(&msg, NULL, 0, 0) > 0 ) { if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
} else { } else {
return(-1); return(-1);
} }
}
if ( posted ) {
return(1); return(1);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment