Commit ebae298a authored by Baruch Rutman's avatar Baruch Rutman Committed by Alexandre Julliard

winmm: Attempt only once to load the default joystick driver.

parent 0c28ca8d
......@@ -68,12 +68,21 @@ static WINE_JOYSTICK JOY_Sticks[MAXJOYSTICK];
*/
static BOOL JOY_LoadDriver(DWORD dwJoyID)
{
if (dwJoyID >= MAXJOYSTICK)
static BOOL winejoystick_missing = FALSE;
if (dwJoyID >= MAXJOYSTICK || winejoystick_missing)
return FALSE;
if (JOY_Sticks[dwJoyID].hDriver)
return TRUE;
JOY_Sticks[dwJoyID].hDriver = OpenDriverA("winejoystick.drv", 0, dwJoyID);
if (!JOY_Sticks[dwJoyID].hDriver)
{
/* The default driver is missing, don't attempt to load it again */
winejoystick_missing = TRUE;
}
return (JOY_Sticks[dwJoyID].hDriver != 0);
}
......
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