Refactor to use Microsoft::WRL::ComPtr (#1599)

This commit is contained in:
oltolm 2025-06-16 23:25:06 +02:00 committed by GitHub
parent da98aa4176
commit 2f02fda9ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 56 additions and 119 deletions

View file

@ -19,7 +19,7 @@ DirectInputControllerProvider::DirectInputControllerProvider()
const auto r = DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&m_dinput8, nullptr);
if (FAILED(r) || !m_dinput8)
if (FAILED(r))
{
const auto error = GetLastError();
//FreeLibrary(m_module);
@ -29,9 +29,6 @@ DirectInputControllerProvider::DirectInputControllerProvider()
DirectInputControllerProvider::~DirectInputControllerProvider()
{
if (m_dinput8)
m_dinput8->Release();
/*if (m_module)
FreeLibrary(m_module);
*/