diff options
| author | JosJuice <josjuice@gmail.com> | 2023-08-16 21:37:12 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2023-08-17 19:19:26 +0200 |
| commit | 7197e3abd0831e0d551fd3b2cd7e3346ce04bc68 (patch) | |
| tree | dbdcd825373e769c41fc703b495b97a9c40902a1 /Source/Core/InputCommon | |
| parent | 1104b93ee4944313d39bb7869dcba1ff21758d6d (diff) | |
Use structs for config callback IDs
This way you can't mix up regular config callback IDs and CPU thread
config callback IDs. (It would be rather bad if you did!)
Diffstat (limited to 'Source/Core/InputCommon')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/InputCommon/GCAdapter.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp index 4d3fa483e3..d3030a60fa 100644 --- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp @@ -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) diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp index 6334a23778..2d135970d1 100644 --- a/Source/Core/InputCommon/GCAdapter.cpp +++ b/Source/Core/InputCommon/GCAdapter.cpp @@ -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{}; |
