diff options
author | Chris Robinson <[email protected]> | 2017-06-28 23:18:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-06-28 23:18:39 -0700 |
commit | 3a16fed279b69dbb74ca26f11279cbf258643ff2 (patch) | |
tree | ea234aea6d0cb3f7dca8d698c1376c678a0e0d2d /router/router.c | |
parent | ef7eced7a700ba12badf412e21e682b1b1c60683 (diff) |
Handle the ALC version for some extension capabilities
Also fix some improper parenthesis.
Diffstat (limited to 'router/router.c')
-rw-r--r-- | router/router.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/router/router.c b/router/router.c index a8a5ebbf..0625c1fe 100644 --- a/router/router.c +++ b/router/router.c @@ -18,7 +18,7 @@ static int DriverListSizeMax = 0; static void LoadDriverList(void); -BOOL APIENTRY DllMain(HINSTANCE module, DWORD reason, void *reserved) +BOOL APIENTRY DllMain(HINSTANCE UNUSED(module), DWORD reason, void* UNUSED(reserved)) { int i; @@ -187,8 +187,16 @@ static void AddModule(HMODULE module, const WCHAR *name) LOAD_PROC(alDistanceModel); if(!err) { + ALCint alc_ver[2]; wcsncpy(DriverList[DriverListSize].Name, name, 32); - DriverList[DriverListSize++].Module = module; + DriverList[DriverListSize].Module = module; + DriverList[DriverListSize].alcGetIntegerv(NULL, ALC_MAJOR_VERSION, 1, &alc_ver[0]); + DriverList[DriverListSize].alcGetIntegerv(NULL, ALC_MINOR_VERSION, 1, &alc_ver[1]); + if(DriverList[DriverListSize].alcGetError(NULL) == ALC_NO_ERROR) + DriverList[DriverListSize].ALCVer = MAKE_ALC_VER(alc_ver[0], alc_ver[1]); + else + DriverList[DriverListSize].ALCVer = MAKE_ALC_VER(1, 0); + DriverListSize++; } } |