From: Aric Stewart Subject: Re: [PATCH v3 2/7] winebus.sys: Support adding and removing SDL devices Message-Id: <2e465c4a-4917-0311-b87c-5ebb20835762@codeweavers.com> Date: Tue, 20 Feb 2018 13:49:01 -0600 In-Reply-To: <87inar1m0b.fsf@winehq.org> References: <495e8bfd-7bf8-7b41-00ff-26fed5d3e6ad@codeweavers.com> <87inar1m0b.fsf@winehq.org> Ok yes, they are missing from the header so I was unsure what the proper approach was for that. Is there a good example of the explicit prototype I could follow? thanks! -aric On 2/20/18 1:47 PM, Alexandre Julliard wrote: > Aric Stewart 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). >