mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
cellPad: fix out of bounds warning
This commit is contained in:
parent
8a63ac033e
commit
571bb914f5
1 changed files with 1 additions and 1 deletions
|
@ -301,7 +301,7 @@ error_code cellPadGetData(u32 port_no, vm::ptr<CellPadData> data)
|
|||
{
|
||||
// report back new data every ~10 ms even if the input doesn't change
|
||||
// this is observed behaviour when using a Dualshock 3 controller
|
||||
static std::chrono::time_point<steady_clock> last_update[CELL_PAD_MAX_PORT_NUM] = { };
|
||||
static std::array<std::chrono::time_point<steady_clock>, CELL_PAD_MAX_PORT_NUM> last_update = { };
|
||||
const std::chrono::time_point<steady_clock> now = steady_clock::now();
|
||||
|
||||
if (btnChanged || pad->m_buffer_cleared || (std::chrono::duration_cast<std::chrono::milliseconds>(now - last_update[port_no]).count() >= 10))
|
||||
|
|
Loading…
Add table
Reference in a new issue