mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 07:51:28 +12:00
cellPad: Fix logic error in setPressMode and setSensorMode
This commit is contained in:
parent
840e9d8ed8
commit
233b179f65
1 changed files with 4 additions and 4 deletions
|
@ -353,9 +353,9 @@ int cellPadInfoSensorMode(u32 port_no)
|
||||||
|
|
||||||
int cellPadSetPressMode(u32 port_no, u32 mode)
|
int cellPadSetPressMode(u32 port_no, u32 mode)
|
||||||
{
|
{
|
||||||
sys_io.Log("cellPadSetPressMode(port_no=%d)", port_no);
|
sys_io.Log("cellPadSetPressMode(port_no=%u, mode=%u)", port_no, mode);
|
||||||
if (!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
if (!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||||
if (mode != 0 || mode != 1) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
if (mode != 0 && mode != 1) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||||
const PadInfo& rinfo = Emu.GetPadManager().GetInfo();
|
const PadInfo& rinfo = Emu.GetPadManager().GetInfo();
|
||||||
if (port_no >= rinfo.max_connect) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
if (port_no >= rinfo.max_connect) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||||
if (port_no >= rinfo.now_connect) return CELL_PAD_ERROR_NO_DEVICE;
|
if (port_no >= rinfo.now_connect) return CELL_PAD_ERROR_NO_DEVICE;
|
||||||
|
@ -372,9 +372,9 @@ int cellPadSetPressMode(u32 port_no, u32 mode)
|
||||||
|
|
||||||
int cellPadSetSensorMode(u32 port_no, u32 mode)
|
int cellPadSetSensorMode(u32 port_no, u32 mode)
|
||||||
{
|
{
|
||||||
sys_io.Log("cellPadSetPressMode(port_no=%d)", port_no);
|
sys_io.Log("cellPadSetSensorMode(port_no=%u, mode=%u)", port_no, mode);
|
||||||
if (!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
if (!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||||
if (mode != 0 || mode != 1) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
if (mode != 0 && mode != 1) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||||
const PadInfo& rinfo = Emu.GetPadManager().GetInfo();
|
const PadInfo& rinfo = Emu.GetPadManager().GetInfo();
|
||||||
if (port_no >= rinfo.max_connect) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
if (port_no >= rinfo.max_connect) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||||
if (port_no >= rinfo.now_connect) return CELL_PAD_ERROR_NO_DEVICE;
|
if (port_no >= rinfo.now_connect) return CELL_PAD_ERROR_NO_DEVICE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue