Changeset 8532 for trunk/src


Ignore:
Timestamp:
May 31, 2002, 11:53:38 AM (23 years ago)
Author:
sandervl
Message:

Ignore injected mouse messages (hook; LLMHF_INJECTED flag)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dinput/mouse.c

    r8416 r8532  
    347347
    348348    if (wparam == WM_MOUSEMOVE) {
     349#ifdef __WIN32OS2__
     350      if(hook->flags != LLMHF_INJECTED)
     351#endif
     352      if(hook->dwExtraInfo != 666)
    349353        if (This->absolute) {
    350354          if (hook->pt.x != This->prevX)
     
    483487    /* Install our mouse hook */
    484488#ifdef __WIN32OS2__
    485     //push ebp
     489    /* push ebp */
    486490    This->hookcode[0]  = 0x55;
    487     //mov  ebp, esp
     491    /* mov  ebp, esp */
    488492    This->hookcode[1]  = 0x8B; This->hookcode[2]  = 0xEC;
    489     //push [ebp+16]
     493    /* push [ebp+16] */
    490494    This->hookcode[3]  = 0xFF; This->hookcode[4]  = 0x75; This->hookcode[5]  = 0x10;
    491     //push [ebp+12]
     495    /* push [ebp+12] */
    492496    This->hookcode[6]  = 0xFF; This->hookcode[7]  = 0x75; This->hookcode[8]  = 0x0C;
    493     //push [ebp+8]
     497    /* push [ebp+8] */
    494498    This->hookcode[9]  = 0xFF; This->hookcode[10] = 0x75; This->hookcode[11] = 0x08;
    495     //push This
     499    /* push This */
    496500    This->hookcode[12] = 0x68; *(DWORD *)&This->hookcode[13]  = (DWORD)This;
    497     //mov  eax, dinput_mouse_hook
     501    /* mov  eax, dinput_mouse_hook */
    498502    This->hookcode[17] = 0xB8; *(DWORD *)&This->hookcode[18]  = (DWORD)&dinput_mouse_hook;
    499     //call eax
     503    /* call eax */
    500504    This->hookcode[22] = 0xFF; This->hookcode[23]  = 0xD0;
    501     //pop  ebp
     505    /* pop  ebp */
    502506    This->hookcode[24] = 0x5D;
    503     //ret  12
     507    /* ret  12 */
    504508    This->hookcode[25] = 0xC2; *(WORD *)&This->hookcode[26]  = 0x000C;
    505509
Note: See TracChangeset for help on using the changeset viewer.