Changeset 3762


Ignore:
Timestamp:
Jun 27, 2000, 8:20:46 PM (25 years ago)
Author:
mike
Message:

Fixed some key values in DInput

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/changelog

    r3758 r3762  
    1  /* $Id: changelog,v 1.1008 2000-06-26 12:24:31 sandervl Exp $ */
     1 /* $Id: changelog,v 1.1009 2000-06-27 18:20:44 mike Exp $ */
     2
     3 2000-06-27: Michal Necasek <michalnec@volny.cz>
     4    - DINPUT:      Fixed some key values, MS uses mostly raw scan
     5                   codes but not always, why am I not surprised?
    26
    37 2000-06-26: Sander van Leeuwen <sandervl@xs4all.nl>
     
    610                   in WinInvalidateRect/Region call -> fixes painting of
    711                   background bitmap in XWing vs Tie Fighter install app.
    8                    WinInvalidateRegion with fIncludeChildren=0 invalidates both 
     12                   WinInvalidateRegion with fIncludeChildren=0 invalidates both
    913                   the parent and child windows (for !WS_CLIPCHILDREN window)
    1014                   fIncludeChildren=1 -> invalidates only child (in xwing case
     
    1418                   applying fixups. (fixes crash in IBM VisualAge Java setup)
    1519
    16  2000-06-24: Michal Necasek <mike@mendelu.cz>
    1720    - KERNEL32:    When creating files and mode is readonly, change to
    1821                   read/write (or else DosOpen fails)
     
    7679    - USER32:      Region fixes (RedrawWindow)
    7780                   Get/SetWindowRgn fixes
    78     - INCLUDE\OS2WRAP.H: 
     81    - INCLUDE\OS2WRAP.H:
    7982                   Added missing wrappers for GpiCreatePolygonRegion,
    8083                   GpiCreateEllipticRegion & GpiCreateRoundRectRegion
     
    8992    - KERNEL32:     - fix in HandleManager::DuplicateHandler to call
    9093                      OSLibDosDupHandle() instead of CreateFile
    91                     - fix oslibdos.h FILE_ SetFilePointer constants 
     94                    - fix oslibdos.h FILE_ SetFilePointer constants
    9295                      were shifted by 1
    9396                    - fix for signed negative 32-bit seek from llseek()
     
    100103    - USER32:       Rewrote ExcludeUpdateRgn & GetUpdateRgn
    101104                    Check if update rectangle is emtpy in PM WM_PAINT msg;
    102                     ignore it when that's the case 
     105                    ignore it when that's the case
    103106                    -> fixes excessive redrawing in Lotus Notes
    104107    - GDI32:        Put back region apis
     
    145148                    if update region doesn't include (part of) the nonclient area.
    146149                    -> fixes RealPlayer 7 titlebar, borders & menu
    147                     GetTopWindow fix. (should work properly now)                 
     150                    GetTopWindow fix. (should work properly now)
    148151
    149152 2000-08-03: knut st. osmundsen <knut.stange.osmundsen@mynd.no>
  • trunk/src/dinput/dinput.cpp

    r3631 r3762  
    1 /* $Id: dinput.cpp,v 1.7 2000-05-29 21:30:17 mike Exp $ */
     1/* $Id: dinput.cpp,v 1.8 2000-06-27 18:20:46 mike Exp $ */
    22/*              DirectInput
    33 *
     
    621621}
    622622
     623BYTE scan2dinput(BYTE scan) {
     624   BYTE dscan;
     625
     626   switch (scan) {
     627      case 0x61:
     628         dscan = DIK_UP;
     629         break;
     630      case 0x63:
     631         dscan = DIK_LEFT;
     632         break;
     633      case 0x64:
     634         dscan = DIK_RIGHT;
     635         break;
     636      case 0x66:
     637         dscan = DIK_DOWN;
     638         break;
     639      case 0x5C:
     640         dscan = DIK_NUMPADSLASH;
     641         break;
     642      case 0x5A:
     643         dscan = DIK_NUMPADENTER;
     644         break;
     645      case 0x68:
     646         dscan = DIK_INSERT;
     647         break;
     648      case 0x60:
     649         dscan = DIK_HOME;
     650         break;
     651      case 0x62:
     652         dscan = DIK_PGUP;
     653         break;
     654      case 0x69:
     655         dscan = DIK_DELETE;
     656         break;
     657      case 0x65:
     658         dscan = DIK_END;
     659         break;
     660      case 0x67:
     661         dscan = DIK_PGDN;
     662         break;
     663      case 0x5B:
     664         dscan = DIK_RCONTROL;
     665         break;
     666      case 0x5E:
     667         dscan = DIK_RALT;
     668         break;
     669      default:
     670         dscan = scan;
     671   }
     672   return dscan;
     673}
     674
    623675LRESULT CALLBACK event_keyHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
    624676   TRACE("DINPUT-SKAI: keyHandler (msg=%x wParam=0x%X, lParam=0x%lX)\n", msg, wParam, lParam);
     
    626678   SysKeyboardAImpl* This = (SysKeyboardAImpl*) current_keylock;
    627679   BYTE  scan = (lParam >> 16) & 0xFF;
    628 
    629    /* messages may arrive mustiple times; we need to check for duplicates */
     680   /* fix the scancode, DInput only uses real scancodes in 90% cases */
     681   scan = scan2dinput(scan);
     682
     683   /* messages may arrive multiple times; we need to check for duplicates */
    630684   static HWND   oldhwnd = NULL;
    631685   static UINT   oldmsg  = 0;
Note: See TracChangeset for help on using the changeset viewer.