mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 11:18:36 +12:00
input: fix minor data race
While usually not exposed to the user, there was a slight chance that user input was read in a dirty state. This became apparent during usage of the new pressure sensitivity button
This commit is contained in:
parent
3fa9d23627
commit
f0d51899c1
7 changed files with 69 additions and 52 deletions
|
@ -889,7 +889,7 @@ error_code cellPadSetSensorMode(u32 port_no, u32 mode)
|
|||
if (port_no >= CELL_PAD_MAX_PORT_NUM)
|
||||
return CELL_OK;
|
||||
|
||||
const auto pad = pads[port_no];
|
||||
const auto& pad = pads[port_no];
|
||||
|
||||
// TODO: find out if this is checked here or later or at all
|
||||
if (!(pad->m_device_capability & CELL_PAD_CAPABILITY_SENSOR_MODE))
|
||||
|
@ -993,6 +993,8 @@ error_code cellPadLddUnregisterController(s32 handle)
|
|||
|
||||
const auto& pads = handler->GetPads();
|
||||
|
||||
// TODO: check if handle >= pads.size()
|
||||
|
||||
if (!pads[handle]->ldd)
|
||||
return CELL_PAD_ERROR_NO_DEVICE;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue