summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
index 23afab7d67..06fd7c544d 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
@@ -4,14 +4,12 @@
#pragma once
-#include <algorithm>
+#include <atomic>
#include <functional>
-#include <map>
-#include <sstream>
-#include <string>
+#include <memory>
+#include <mutex>
#include <vector>
-#include "Common/CommonTypes.h"
#include "InputCommon/ControllerInterface/Device.h"
// enable disable sources
@@ -53,12 +51,14 @@ public:
bool IsInit() const { return m_is_init; }
void UpdateInput();
- void RegisterHotplugCallback(std::function<void(void)> callback);
- void InvokeHotplugCallbacks() const;
+ void RegisterDevicesChangedCallback(std::function<void(void)> callback);
+ void InvokeDevicesChangedCallbacks() const;
private:
- std::vector<std::function<void()>> m_hotplug_callbacks;
+ std::vector<std::function<void()>> m_devices_changed_callbacks;
+ mutable std::mutex m_callbacks_mutex;
bool m_is_init;
+ std::atomic<bool> m_is_populating_devices{false};
void* m_hwnd;
};