Date: Sun, 21 Sep 2003 19:52:42 -0600
authorSam Lantinga <slouken@libsdl.org>
Wed, 25 Jan 2006 07:00:40 +0000
changeset 1264f3a3f1890b91
parent 1263 3bdcef7e1c90
child 1265 670e74bf5cc8
Date: Sun, 21 Sep 2003 19:52:42 -0600
From: Tyler Montbriand <tsm@accesscomm.ca>
Subject: Re: [SDL] Hardware buttons on pocket pc

I found it! :)

It has to do with the UNICODE translation code, in SDL_dibevents.c, in the
'#ifdef NO_GETKEYBOARDSTATE' block in DIB_HandleMessage(). The error
handling is a little... aggressive. If it can't translate from unicode, it
wipes out the virtual keycode.
src/video/windib/SDL_dibevents.c
     1.1 --- a/src/video/windib/SDL_dibevents.c	Wed Jan 25 06:53:50 2006 +0000
     1.2 +++ b/src/video/windib/SDL_dibevents.c	Wed Jan 25 07:00:40 2006 +0000
     1.3 @@ -147,8 +147,6 @@
     1.4  				if ( TranslateMessage(&m) && PeekMessage(&m, hwnd, 0, WM_USER, PM_NOREMOVE) && (m.message == WM_CHAR) ) {
     1.5  					GetMessage(&m, hwnd, 0, WM_USER);
     1.6  			    		wParam = m.wParam;
     1.7 -				} else {
     1.8 -					wParam = 0;
     1.9  				}
    1.10  			}
    1.11  #endif /* NO_GETKEYBOARDSTATE */