Ignore:
Timestamp:
Dec 15, 2011, 11:24:47 AM (14 years ago)
Author:
dmik
Message:

Fix crashes in GUI apps when pressing modifier keys.

This was due the fact that BYTE is signed in the toolkit and converting it
to an unsigned int causes the sign bit to be extended in the result while
the code assumes that the extension is made with zeroes (this is how
VAC converts signed integers of smaller precisions to unsigned ones).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/include/winkeyboard.h

    r21811 r21885  
    1414#endif
    1515
    16 BYTE WIN32API KeyTranslatePMToWin(BYTE key);
    17 void WIN32API KeyTranslatePMToWinBuf(BYTE *pmkey, BYTE *winkey, int nrkeys);
    18 void WIN32API KeyTranslatePMScanToWinVKey(BYTE bPMScan,
     16void WIN32API KeyTranslatePMToWinBuf(PUCHAR pmkey, PUCHAR winkey, int nrkeys);
     17void WIN32API KeyTranslatePMScanToWinVKey(UCHAR uchPMScan,
    1918                                          BOOL bNumLock,
    20                                           PBYTE pbWinVKey,
    21                                           WORD* pwWinScan,
     19                                          PUCHAR puchWinVKey,
     20                                          WORD *pwWinScan,
    2221                                          PBOOL pfExtended);
    23 BYTE WIN32API KeyTranslateWinVKeyToPMScan(BYTE bWinVKey, BOOL fExtended);
    24 BYTE WIN32API KeyTranslateWinScanToPMScan(BYTE bWinScan, BOOL fExtended);
     22UCHAR WIN32API KeyTranslateWinVKeyToPMScan(UCHAR uchWinVKey, BOOL fExtended);
     23UCHAR WIN32API KeyTranslateWinScanToPMScan(UCHAR uchWinScan, BOOL fExtended);
    2524
    2625#define KEYOVERLAYSTATE_DONTCARE 0
Note: See TracChangeset for help on using the changeset viewer.