1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

cellPad: Clear info structs before setting

This commit is contained in:
Jake 2017-05-30 21:54:35 -05:00 committed by kd-11
parent 56b21fd411
commit 195f24507b

View File

@ -287,6 +287,8 @@ s32 cellPadPeriphGetInfo(vm::ptr<CellPadPeriphInfo> info)
const PadInfo& rinfo = handler->GetInfo(); const PadInfo& rinfo = handler->GetInfo();
std::memset(info.get_ptr(), 0, sizeof(CellPadPeriphInfo));
info->max_connect = rinfo.max_connect; info->max_connect = rinfo.max_connect;
info->now_connect = rinfo.now_connect; info->now_connect = rinfo.now_connect;
info->system_info = rinfo.system_info; info->system_info = rinfo.system_info;
@ -394,6 +396,8 @@ s32 cellPadGetInfo(vm::ptr<CellPadInfo> info)
if (!handler) if (!handler)
return CELL_PAD_ERROR_UNINITIALIZED; return CELL_PAD_ERROR_UNINITIALIZED;
std::memset(info.get_ptr(), 0, sizeof(CellPadInfo));
const PadInfo& rinfo = handler->GetInfo(); const PadInfo& rinfo = handler->GetInfo();
info->max_connect = rinfo.max_connect; info->max_connect = rinfo.max_connect;
info->now_connect = rinfo.now_connect; info->now_connect = rinfo.now_connect;
@ -424,6 +428,8 @@ s32 cellPadGetInfo2(vm::ptr<CellPadInfo2> info)
if (!handler) if (!handler)
return CELL_PAD_ERROR_UNINITIALIZED; return CELL_PAD_ERROR_UNINITIALIZED;
std::memset(info.get_ptr(), 0, sizeof(CellPadInfo2));
const PadInfo& rinfo = handler->GetInfo(); const PadInfo& rinfo = handler->GetInfo();
info->max_connect = rinfo.max_connect; info->max_connect = rinfo.max_connect;
info->now_connect = rinfo.now_connect; info->now_connect = rinfo.now_connect;