user32: Use the standard Interlocked* functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-05-02 15:10:10 +02:00
parent 39e4b788d6
commit 5d5b6a1f35
2 changed files with 2 additions and 2 deletions

View File

@ -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)
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;
}

View File

@ -433,7 +433,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
* (like Adobe Photoshop CS5) expect that changes to the async key state
* are also immediately available in other threads. */
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->counter = counter;