diff options
author | Chris Robinson <[email protected]> | 2018-10-30 17:03:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-10-30 17:03:21 -0700 |
commit | da150572f94ec354c8061c0bf1aafa0926c6dbc7 (patch) | |
tree | 916247e9790b7ae5649b44a14763e61d3bdc2d34 /router/router.cpp | |
parent | 615c025b6786adfd38446559b48b453e1e6c4883 (diff) |
Clean up the DriverIface in its destructor
Diffstat (limited to 'router/router.cpp')
-rw-r--r-- | router/router.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/router/router.cpp b/router/router.cpp index 049ac3bc..66bf5dd3 100644 --- a/router/router.cpp +++ b/router/router.cpp @@ -63,11 +63,6 @@ BOOL APIENTRY DllMain(HINSTANCE UNUSED(module), DWORD reason, void* UNUSED(reser break; case DLL_PROCESS_DETACH: - for(auto &drv : DriverList) - { - if(drv.Module) - FreeLibrary(drv.Module); - } DriverList.clear(); if(LogFile && LogFile != stderr) @@ -98,7 +93,7 @@ static void AddModule(HMODULE module, const WCHAR *name) } } - DriverList.emplace_back(); + DriverList.emplace_back(name, module); DriverIface &newdrv = DriverList.back(); /* Load required functions. */ @@ -209,8 +204,6 @@ static void AddModule(HMODULE module, const WCHAR *name) if(!err) { ALCint alc_ver[2] = { 0, 0 }; - newdrv.Name = name; - newdrv.Module = module; newdrv.alcGetIntegerv(nullptr, ALC_MAJOR_VERSION, 1, &alc_ver[0]); newdrv.alcGetIntegerv(nullptr, ALC_MINOR_VERSION, 1, &alc_ver[1]); if(newdrv.alcGetError(nullptr) == ALC_NO_ERROR) |