[PATCH v3 2/7] winebus.sys: Support adding and removing SDL devices

Alexandre Julliard julliard at winehq.org
Tue Feb 20 13:47:32 CST 2018


Aric Stewart <aric at codeweavers.com> writes:

> +#ifdef SONAME_LIBSDL2
> +#define MAKE_FUNCPTR(f) static typeof(f) * p##f = NULL
> +MAKE_FUNCPTR(SDL_GetError);
> +MAKE_FUNCPTR(SDL_Init);
> +MAKE_FUNCPTR(SDL_JoystickEventState);
> +MAKE_FUNCPTR(SDL_JoystickGetGUID);
> +MAKE_FUNCPTR(SDL_JoystickGetGUIDString);
> +#ifdef HAVE_SDL_VIDPID
> +MAKE_FUNCPTR(SDL_JoystickGetProduct);
> +MAKE_FUNCPTR(SDL_JoystickGetProductVersion);
> +MAKE_FUNCPTR(SDL_JoystickGetVendor);
> +#endif

Now that you are loading the library dynamically, HAVE_SDL_VIDPID should
be replaced by a run-time check for the necessary functions (note that
you may need to declare the prototypes explicitly if they are missing
from the header).

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list