src/video/windib/SDL_dibevents.c
changeset 112 9ef74357a5fb
parent 36 13ee9f4834ea
child 140 3c35d8f160bd
     1.1 --- a/src/video/windib/SDL_dibevents.c	Sat Jul 14 20:37:24 2001 +0000
     1.2 +++ b/src/video/windib/SDL_dibevents.c	Wed Jul 18 20:04:23 2001 +0000
     1.3 @@ -87,6 +87,26 @@
     1.4  						wParam = VK_LMENU;
     1.5  					break;
     1.6  			}
     1.7 +#ifdef NO_GETKEYBOARDSTATE
     1.8 +			/* this is the workaround for the missing ToAscii() and ToUnicode() in CE (not necessary at KEYUP!) */
     1.9 +			if ( SDL_TranslateUNICODE ) {
    1.10 +				MSG msg;
    1.11 +
    1.12 +				msg.hwnd = hwnd;
    1.13 +				msg.message = msg;
    1.14 +				msg.wParam = wParam;
    1.15 +				msg.lParam = lParam;
    1.16 +				msg.time = 0;
    1.17 +				if ( TranslateMessage(&m) && PeekMessage(&msg, hwnd, 0, WM_USER, PM_NOREMOVE) && (m.message == WM_CHAR) ) {
    1.18 +					GetMessage(&m, hwnd, 0, WM_USER);
    1.19 +			    		wParam = m.wParam;
    1.20 +				} else {
    1.21 +					wParam = 0;
    1.22 +				}
    1.23 +			} else {
    1.24 +				wParam = 0;
    1.25 +			}
    1.26 +#endif /* NO_GETKEYBOARDSTATE */
    1.27  			posted = SDL_PrivateKeyboard(SDL_PRESSED,
    1.28  				TranslateKey(wParam,HIWORD(lParam),&keysym,1));
    1.29  		}