ControllerInterface: don't call InvokeDevicesChangedCallbacks more than once when refreshing

This commit is contained in:
Michael M 2017-11-04 07:37:03 -07:00
parent fd7cbd633e
commit 8e6677be90
2 changed files with 14 additions and 2 deletions

View file

@ -4,6 +4,7 @@
#pragma once
#include <atomic>
#include <functional>
#include <memory>
#include <mutex>
@ -57,6 +58,7 @@ private:
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;
};