Merge pull request #12117 from JosJuice/config-callback-cpu

Don't call RunAsCPUThread in config callbacks
This commit is contained in:
Admiral H. Curtiss
2023-08-26 16:34:46 +02:00
committed by GitHub
33 changed files with 234 additions and 49 deletions

View File

@ -219,7 +219,7 @@ private:
SteadyClock::time_point m_next_listports_time;
std::thread m_hotplug_thread;
Common::Flag m_hotplug_thread_running;
std::size_t m_config_change_callback_id;
Config::ConfigChangedCallbackID m_config_change_callback_id;
};
std::unique_ptr<ciface::InputBackend> CreateInputBackend(ControllerInterface* controller_interface)

View File

@ -23,6 +23,7 @@
#endif
#include "Common/BitUtils.h"
#include "Common/Config/Config.h"
#include "Common/Event.h"
#include "Common/Flag.h"
#include "Common/Logging/Log.h"
@ -158,7 +159,7 @@ static u8 s_endpoint_out = 0;
static u64 s_last_init = 0;
static std::optional<size_t> s_config_callback_id = std::nullopt;
static std::optional<Config::ConfigChangedCallbackID> s_config_callback_id = std::nullopt;
static bool s_is_adapter_wanted = false;
static std::array<bool, SerialInterface::MAX_SI_CHANNELS> s_config_rumble_enabled{};