Mercurial > sdl-ios-xcode
diff src/video/windx5/SDL_dx5events.c @ 4291:6cc2b35ac610 SDL-1.2
Fixed bug #634
If TranslateMessage() isn't done, then IME messages aren't generated.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 10 Oct 2009 07:30:00 +0000 |
parents | 0adda8ff43ef |
children | daf9e6037596 |
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5events.c Sat Oct 10 06:38:02 2009 +0000 +++ b/src/video/windx5/SDL_dx5events.c Sat Oct 10 07:30:00 2009 +0000 @@ -655,6 +655,7 @@ while ( ! posted && PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { if ( GetMessage(&msg, NULL, 0, 0) > 0 ) { + TranslateMessage(&msg); DispatchMessage(&msg); } else { return(-1); @@ -713,12 +714,17 @@ } if ( event != WAIT_TIMEOUT ) { /* 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 ) { + TranslateMessage(&msg); DispatchMessage(&msg); } else { return(-1); } + } + if ( posted ) { return(1); } }