diff options
author | german77 <juangerman-13@hotmail.com> | 2023-11-03 02:14:05 +0100 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-11-03 03:33:19 +0100 |
commit | b36fec486e063fc16c50346179bd8e1cb26ee177 (patch) | |
tree | 2c32b1612dd7a206edfd38966aa14223d864f8fe | |
parent | Merge pull request #11920 from Termynat0r/master (diff) | |
download | yuzu-b36fec486e063fc16c50346179bd8e1cb26ee177.tar yuzu-b36fec486e063fc16c50346179bd8e1cb26ee177.tar.gz yuzu-b36fec486e063fc16c50346179bd8e1cb26ee177.tar.bz2 yuzu-b36fec486e063fc16c50346179bd8e1cb26ee177.tar.lz yuzu-b36fec486e063fc16c50346179bd8e1cb26ee177.tar.xz yuzu-b36fec486e063fc16c50346179bd8e1cb26ee177.tar.zst yuzu-b36fec486e063fc16c50346179bd8e1cb26ee177.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/ring_lifo.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/ring_lifo.h b/src/core/hle/service/hid/ring_lifo.h index 65eb7ea02..0816784e0 100644 --- a/src/core/hle/service/hid/ring_lifo.h +++ b/src/core/hle/service/hid/ring_lifo.h @@ -32,15 +32,15 @@ struct Lifo { } std::size_t GetPreviousEntryIndex() const { - return static_cast<size_t>((buffer_tail + total_buffer_count - 1) % total_buffer_count); + return static_cast<size_t>((buffer_tail + max_buffer_size - 1) % max_buffer_size); } std::size_t GetNextEntryIndex() const { - return static_cast<size_t>((buffer_tail + 1) % total_buffer_count); + return static_cast<size_t>((buffer_tail + 1) % max_buffer_size); } void WriteNextEntry(const State& new_state) { - if (buffer_count < total_buffer_count - 1) { + if (buffer_count < static_cast<s64>(max_buffer_size) - 1) { buffer_count++; } buffer_tail = GetNextEntryIndex(); |