dinput: Make find_joydevs re-entrant.
This commit is contained in:
parent
2e0aefc1fd
commit
ae26ca6c28
|
@ -217,11 +217,9 @@ static void find_joydevs(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (have_joydevs!=-1) {
|
||||
if (InterlockedCompareExchange(&have_joydevs, 0, -1) != -1)
|
||||
/* Someone beat us to it */
|
||||
return;
|
||||
}
|
||||
|
||||
have_joydevs = 0;
|
||||
|
||||
for (i=0;i<MAX_JOYDEV;i++) {
|
||||
char buf[MAX_PATH];
|
||||
|
|
Loading…
Reference in New Issue