Commit ae26ca6c authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Make find_joydevs re-entrant.

parent 2e0aefc1
......@@ -215,13 +215,11 @@ static struct JoyDev *joydevs = NULL;
static void find_joydevs(void)
{
int i;
if (have_joydevs!=-1) {
return;
}
int i;
have_joydevs = 0;
if (InterlockedCompareExchange(&have_joydevs, 0, -1) != -1)
/* Someone beat us to it */
return;
for (i=0;i<MAX_JOYDEV;i++) {
char buf[MAX_PATH];
......
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