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

@ -2,6 +2,7 @@
#include "input/api/DirectInput/DirectInputControllerProvider.h"
#include "input/api/Controller.h"
#include <wrl/client.h>
class DirectInputController : public Controller<DirectInputControllerProvider>
{
@ -41,9 +42,9 @@ private:
GUID m_product_guid{};
std::shared_mutex m_mutex;
LPDIRECTINPUTDEVICE8 m_device = nullptr;
LPDIRECTINPUTEFFECT m_effect = nullptr;
Microsoft::WRL::ComPtr<IDirectInputDevice8> m_device;
Microsoft::WRL::ComPtr<IDirectInputEffect> m_effect;
std::array<LONG, 6> m_min_axis{};
std::array<LONG, 6> m_max_axis{};
};
};