mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
Fix cellKb
This commit is contained in:
parent
e5f756205c
commit
45a855ef1f
@ -177,6 +177,9 @@ error_code cellKbSetCodeType(u32 port_no, u32 type)
|
|||||||
|
|
||||||
if (!handler)
|
if (!handler)
|
||||||
return CELL_KB_ERROR_UNINITIALIZED;
|
return CELL_KB_ERROR_UNINITIALIZED;
|
||||||
|
|
||||||
|
if (port_no >= handler->GetKeyboards().size())
|
||||||
|
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
KbConfig& current_config = handler->GetConfig(port_no);
|
KbConfig& current_config = handler->GetConfig(port_no);
|
||||||
current_config.code_type = type;
|
current_config.code_type = type;
|
||||||
@ -197,6 +200,9 @@ error_code cellKbSetReadMode(u32 port_no, u32 rmode)
|
|||||||
|
|
||||||
if (!handler)
|
if (!handler)
|
||||||
return CELL_KB_ERROR_UNINITIALIZED;
|
return CELL_KB_ERROR_UNINITIALIZED;
|
||||||
|
|
||||||
|
if (port_no >= handler->GetKeyboards().size())
|
||||||
|
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
KbConfig& current_config = handler->GetConfig(port_no);
|
KbConfig& current_config = handler->GetConfig(port_no);
|
||||||
current_config.read_mode = rmode;
|
current_config.read_mode = rmode;
|
||||||
@ -213,6 +219,9 @@ error_code cellKbGetConfiguration(u32 port_no, vm::ptr<CellKbConfig> config)
|
|||||||
if (!handler)
|
if (!handler)
|
||||||
return CELL_KB_ERROR_UNINITIALIZED;
|
return CELL_KB_ERROR_UNINITIALIZED;
|
||||||
|
|
||||||
|
if (port_no >= handler->GetKeyboards().size())
|
||||||
|
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
const KbConfig& current_config = handler->GetConfig(port_no);
|
const KbConfig& current_config = handler->GetConfig(port_no);
|
||||||
config->arrange = current_config.arrange;
|
config->arrange = current_config.arrange;
|
||||||
config->read_mode = current_config.read_mode;
|
config->read_mode = current_config.read_mode;
|
||||||
|
Loading…
Reference in New Issue
Block a user