On Fri, 9 Jun 2017 12:07:59 +0300 Martin Storsjö <mar...@martin.st> wrote:
> When targeting the UWP API subset, the LoadLibrary function is not > available (and the fallback, LoadPackagedLibrary, can't be used to > load system DLLs). In these cases, link directly to the functions > in the DLLs instead of trying to load them dynamically at runtime > instead. > --- I guess I agree with this, since the only reason to dynamically load the DLLs is for compatibility with older (non-UWP) systems. The ifdeffery is still a bit heavy though. Would it be reasonable to do the following: 1. Put all loading into an init_once function, 2. Load the DLL functions into global (static) variables, 3. Never unload the DLLs (this doesn't help anyway, other than exposing various driver bugs) Then the d3d11va_device_create() code would still look relatively clean. Anyway, feel no objections to this patch, my suggestion can be applied later if there's agreement. _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel