kb/mouse: fix max in init

This commit is contained in:
Jake 2017-06-02 21:42:34 -05:00 committed by Ivan
parent 9cc52c75e3
commit f77e9f8bc1
2 changed files with 2 additions and 10 deletions

View File

@ -35,15 +35,12 @@ error_code cellKbInit(u32 max_connect)
{
sys_io.warning("cellKbInit(max_connect=%d)", max_connect);
if (max_connect > 7)
return CELL_KB_ERROR_INVALID_PARAMETER;
const auto handler = fxm::import<KeyboardHandlerBase>(Emu.GetCallbacks().get_kb_handler);
if (!handler)
return CELL_KB_ERROR_ALREADY_INITIALIZED;
handler->Init(max_connect);
handler->Init(std::min(max_connect, 7u));
return CELL_OK;
}

View File

@ -12,11 +12,6 @@ s32 cellMouseInit(u32 max_connect)
{
sys_io.warning("cellMouseInit(max_connect=%d)", max_connect);
if (max_connect > 7)
{
return CELL_MOUSE_ERROR_INVALID_PARAMETER;
}
const auto handler = fxm::import<MouseHandlerBase>(Emu.GetCallbacks().get_mouse_handler);
if (!handler)
@ -24,7 +19,7 @@ s32 cellMouseInit(u32 max_connect)
return CELL_MOUSE_ERROR_ALREADY_INITIALIZED;
}
handler->Init(max_connect);
handler->Init(std::min(max_connect, 7u));
return CELL_OK;
}