diff options
| author | Mai <mai.iam2048@gmail.com> | 2023-03-10 16:54:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-10 16:54:35 -0500 |
| commit | e4df3881286c8c3a4de1a7381f492ae1de64087f (patch) | |
| tree | 1fd63413b5a4a8bdfc8b9d42d13f89f77a63c90d /Source/Core/DolphinQt/TAS/TASControlState.cpp | |
| parent | 00a6f8c82c8631b8a53feaedad930057cdd8cc0d (diff) | |
| parent | 4d34f861214612b8b3ef88a0291a89c783734144 (diff) | |
Merge pull request #11638 from JosJuice/tas-input-motionplus
DolphinQt: Add MotionPlus support to TAS input
Diffstat (limited to 'Source/Core/DolphinQt/TAS/TASControlState.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/TAS/TASControlState.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/DolphinQt/TAS/TASControlState.cpp b/Source/Core/DolphinQt/TAS/TASControlState.cpp index fd0c209aa6..a961d8e437 100644 --- a/Source/Core/DolphinQt/TAS/TASControlState.cpp +++ b/Source/Core/DolphinQt/TAS/TASControlState.cpp @@ -7,7 +7,7 @@ #include "Common/CommonTypes.h" -u16 TASControlState::GetValue() const +int TASControlState::GetValue() const { const State ui_thread_state = m_ui_thread_state.load(std::memory_order_relaxed); const State cpu_thread_state = m_cpu_thread_state.load(std::memory_order_relaxed); @@ -16,7 +16,7 @@ u16 TASControlState::GetValue() const .value; } -bool TASControlState::OnControllerValueChanged(u16 new_value) +bool TASControlState::OnControllerValueChanged(int new_value) { const State cpu_thread_state = m_cpu_thread_state.load(std::memory_order_relaxed); @@ -26,13 +26,13 @@ bool TASControlState::OnControllerValueChanged(u16 new_value) return false; } - const State new_state{static_cast<u16>(cpu_thread_state.version + 1), new_value}; + const State new_state{static_cast<int>(cpu_thread_state.version + 1), new_value}; m_cpu_thread_state.store(new_state, std::memory_order_relaxed); return true; } -void TASControlState::OnUIValueChanged(u16 new_value) +void TASControlState::OnUIValueChanged(int new_value) { const State ui_thread_state = m_ui_thread_state.load(std::memory_order_relaxed); @@ -40,7 +40,7 @@ void TASControlState::OnUIValueChanged(u16 new_value) m_ui_thread_state.store(new_state, std::memory_order_relaxed); } -u16 TASControlState::ApplyControllerValueChange() +int TASControlState::ApplyControllerValueChange() { const State ui_thread_state = m_ui_thread_state.load(std::memory_order_relaxed); const State cpu_thread_state = m_cpu_thread_state.load(std::memory_order_relaxed); |
