diff options
| author | 2022-04-08 14:14:53 -0700 | |
|---|---|---|
| committer | 2022-04-08 14:14:53 -0700 | |
| commit | 32e2fb5d335888bda144358c9d3e9b74ecf702f6 (patch) | |
| tree | 78ce85dd092a80a3c2f4ccfa034a6486994ab61c /src/core/hid/emulated_controller.h | |
| parent | Merge pull request #8169 from merryhime/scoped_lock (diff) | |
| parent | core: hid: Fix double lock on softlock and forced updates (diff) | |
| download | yuzu-32e2fb5d335888bda144358c9d3e9b74ecf702f6.tar.gz yuzu-32e2fb5d335888bda144358c9d3e9b74ecf702f6.tar.xz yuzu-32e2fb5d335888bda144358c9d3e9b74ecf702f6.zip | |
Merge pull request #8138 from german77/data-no-race
core: hid: Reduce the amount of data races
Diffstat (limited to 'src/core/hid/emulated_controller.h')
| -rw-r--r-- | src/core/hid/emulated_controller.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h index aa52f9572..1e224685d 100644 --- a/src/core/hid/emulated_controller.h +++ b/src/core/hid/emulated_controller.h | |||
| @@ -400,7 +400,7 @@ private: | |||
| 400 | */ | 400 | */ |
| 401 | void TriggerOnChange(ControllerTriggerType type, bool is_service_update); | 401 | void TriggerOnChange(ControllerTriggerType type, bool is_service_update); |
| 402 | 402 | ||
| 403 | NpadIdType npad_id_type; | 403 | const NpadIdType npad_id_type; |
| 404 | NpadStyleIndex npad_type{NpadStyleIndex::None}; | 404 | NpadStyleIndex npad_type{NpadStyleIndex::None}; |
| 405 | NpadStyleTag supported_style_tag{NpadStyleSet::All}; | 405 | NpadStyleTag supported_style_tag{NpadStyleSet::All}; |
| 406 | bool is_connected{false}; | 406 | bool is_connected{false}; |
| @@ -434,6 +434,7 @@ private: | |||
| 434 | StickDevices tas_stick_devices; | 434 | StickDevices tas_stick_devices; |
| 435 | 435 | ||
| 436 | mutable std::mutex mutex; | 436 | mutable std::mutex mutex; |
| 437 | mutable std::mutex callback_mutex; | ||
| 437 | std::unordered_map<int, ControllerUpdateCallback> callback_list; | 438 | std::unordered_map<int, ControllerUpdateCallback> callback_list; |
| 438 | int last_callback_key = 0; | 439 | int last_callback_key = 0; |
| 439 | 440 | ||