Commit 5d5b6a1f authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Use the standard Interlocked* functions.

parent 39e4b788
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment