diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/address_arbiter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index e9c8369d7..d5df9590a 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp | |||
| @@ -115,7 +115,7 @@ ResultCode ModifyByWaitingCountAndSignalToAddressIfEqual(VAddr address, s32 valu | |||
| 115 | s32 updated_value; | 115 | s32 updated_value; |
| 116 | if (waiting_threads.size() == 0) { | 116 | if (waiting_threads.size() == 0) { |
| 117 | updated_value = value - 1; | 117 | updated_value = value - 1; |
| 118 | } else if (num_to_wake <= 0 || waiting_threads.size() <= num_to_wake) { | 118 | } else if (num_to_wake <= 0 || waiting_threads.size() <= static_cast<u32>(num_to_wake)) { |
| 119 | updated_value = value + 1; | 119 | updated_value = value + 1; |
| 120 | } else { | 120 | } else { |
| 121 | updated_value = value; | 121 | updated_value = value; |
| @@ -140,7 +140,9 @@ ResultCode WaitForAddressIfLessThan(VAddr address, s32 value, s64 timeout, bool | |||
| 140 | 140 | ||
| 141 | s32 cur_value = static_cast<s32>(Memory::Read32(address)); | 141 | s32 cur_value = static_cast<s32>(Memory::Read32(address)); |
| 142 | if (cur_value < value) { | 142 | if (cur_value < value) { |
| 143 | Memory::Write32(address, static_cast<u32>(cur_value - 1)); | 143 | if (should_decrement) { |
| 144 | Memory::Write32(address, static_cast<u32>(cur_value - 1)); | ||
| 145 | } | ||
| 144 | } else { | 146 | } else { |
| 145 | return ERR_INVALID_STATE; | 147 | return ERR_INVALID_STATE; |
| 146 | } | 148 | } |