user32: Use the standard Interlocked* functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
39e4b788d6
commit
5d5b6a1f35
|
@ -449,7 +449,7 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->id == WH_KEYBOARD_LL || info->id == WH_MOUSE_LL)
|
if (info->id == WH_KEYBOARD_LL || info->id == WH_MOUSE_LL)
|
||||||
interlocked_xchg_add( &global_key_state_counter, 1 ); /* force refreshing the key state cache */
|
InterlockedIncrement( &global_key_state_counter ); /* force refreshing the key state cache */
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,7 +433,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
|
||||||
* (like Adobe Photoshop CS5) expect that changes to the async key state
|
* (like Adobe Photoshop CS5) expect that changes to the async key state
|
||||||
* are also immediately available in other threads. */
|
* are also immediately available in other threads. */
|
||||||
if (prev_key_state != key_state_info->state[key])
|
if (prev_key_state != key_state_info->state[key])
|
||||||
counter = interlocked_xchg_add( &global_key_state_counter, 1 ) + 1;
|
counter = InterlockedIncrement( &global_key_state_counter );
|
||||||
|
|
||||||
key_state_info->time = GetTickCount();
|
key_state_info->time = GetTickCount();
|
||||||
key_state_info->counter = counter;
|
key_state_info->counter = counter;
|
||||||
|
|
Loading…
Reference in New Issue