As reported by @zhmars, we need to check the override in both code
paths.
That's because we get only one candidate, while for Intel GPUs we have 2
drivers - so this might work when the user needs iHD, but will fail if
they rely on the older driver.
Signed-off-by: Emil Velikov <email address hidden>
The Windows getenv function reads the snapshot of values of env. variables
at va.dll load time, disregarding future putenv calls from the same process.
This causes issues for apps/tests that do putenv/setenv for LIBVA_DRIVER_NAME or
LIBVA_DRIVERS_PATH before calling vaInitialize. For example, the vaInitialize_vaTerminate
tests in libva-utils test suite.
Fortunately there's a GetEnvironmentVariableA function that does the proper env. var reading
taking into account calls to putenv/setenv. Use that function instead for Windows.