# HG changeset patch # User Sam Lantinga # Date 1138172440 0 # Node ID f3a3f1890b911705b78211206d3347abd6c0937c # Parent 3bdcef7e1c90af7eedd1f6f980f90f79e33b594c Date: Sun, 21 Sep 2003 19:52:42 -0600 From: Tyler Montbriand 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. diff -r 3bdcef7e1c90 -r f3a3f1890b91 src/video/windib/SDL_dibevents.c --- a/src/video/windib/SDL_dibevents.c Wed Jan 25 06:53:50 2006 +0000 +++ b/src/video/windib/SDL_dibevents.c Wed Jan 25 07:00:40 2006 +0000 @@ -147,8 +147,6 @@ if ( TranslateMessage(&m) && PeekMessage(&m, hwnd, 0, WM_USER, PM_NOREMOVE) && (m.message == WM_CHAR) ) { GetMessage(&m, hwnd, 0, WM_USER); wParam = m.wParam; - } else { - wParam = 0; } } #endif /* NO_GETKEYBOARDSTATE */