Skip to content

Commit

Permalink
Make cellMouseGetDataList return CELL_MOUSE_ERROR_NO_DEVICE if mouse …
Browse files Browse the repository at this point in the history
…handler is set to null
  • Loading branch information
hcorion authored and AniLeo committed Nov 4, 2017
1 parent 4600094 commit 6782b22
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions rpcs3/Emu/Cell/Modules/cellMouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ s32 cellMouseGetInfo(vm::ptr<CellMouseInfo> info)
for (u32 i=0; i<CELL_MAX_MICE; i++) info->vendor_id[i] = current_info.vendor_id[i];
for (u32 i=0; i<CELL_MAX_MICE; i++) info->product_id[i] = current_info.product_id[i];
for (u32 i=0; i<CELL_MAX_MICE; i++) info->status[i] = current_info.status[i];

return CELL_OK;
}

Expand All @@ -96,7 +96,7 @@ s32 cellMouseInfoTabletMode(u32 port_no, vm::ptr<CellMouseInfoTablet> info)

info->is_supported = 0; // Unimplemented: (0=Tablet mode is not supported)
info->mode = 1; // Unimplemented: (1=Mouse mode)

return CELL_OK;
}

Expand All @@ -115,7 +115,7 @@ s32 cellMouseGetData(u32 port_no, vm::ptr<CellMouseData> data)
{
return CELL_MOUSE_ERROR_NO_DEVICE;
}

MouseData& current_data = handler->GetData(port_no);
data->update = current_data.update;
data->buttons = current_data.buttons;
Expand All @@ -134,22 +134,27 @@ s32 cellMouseGetData(u32 port_no, vm::ptr<CellMouseData> data)

s32 cellMouseGetDataList(u32 port_no, vm::ptr<CellMouseDataList> data)
{
UNIMPLEMENTED_FUNC(sys_io);

return CELL_OK;
sys_io.todo("cellMouseGetDataList(port_no=%d, data=0x%x", port_no, data);
if (g_cfg.io.mouse == mouse_handler::null)
return CELL_MOUSE_ERROR_NO_DEVICE;
else
{
data->list_num = 0;
return CELL_OK;
}
}

s32 cellMouseSetTabletMode(u32 port_no, u32 mode)
{
UNIMPLEMENTED_FUNC(sys_io);

return CELL_OK;
}

s32 cellMouseGetTabletDataList(u32 port_no, u32 data_addr)
{
UNIMPLEMENTED_FUNC(sys_io);

return CELL_OK;
}

Expand Down

0 comments on commit 6782b22

Please sign in to comment.