diff --git a/rpcs3/Emu/Cell/Modules/cellKb.cpp b/rpcs3/Emu/Cell/Modules/cellKb.cpp index e7d9ce0a8c..b90eef2f12 100644 --- a/rpcs3/Emu/Cell/Modules/cellKb.cpp +++ b/rpcs3/Emu/Cell/Modules/cellKb.cpp @@ -119,7 +119,7 @@ error_code cellKbClearBuf(u32 port_no) const KbInfo& current_info = handler.GetInfo(); if (port_no >= handler.GetKeyboards().size() || current_info.status[port_no] != CELL_KB_STATUS_CONNECTED) - return CELL_KB_ERROR_NO_DEVICE; + return not_an_error(CELL_KB_ERROR_NO_DEVICE); KbData& current_data = handler.GetData(port_no); current_data.len = 0; @@ -331,7 +331,7 @@ error_code cellKbRead(u32 port_no, vm::ptr data) const KbInfo& current_info = handler.GetInfo(); if (port_no >= handler.GetKeyboards().size() || current_info.status[port_no] != CELL_KB_STATUS_CONNECTED) - return CELL_KB_ERROR_NO_DEVICE; + return not_an_error(CELL_KB_ERROR_NO_DEVICE); KbData& current_data = handler.GetData(port_no); @@ -474,7 +474,7 @@ error_code cellKbGetConfiguration(u32 port_no, vm::ptr config) const KbInfo& current_info = handler.GetInfo(); if (port_no >= handler.GetKeyboards().size() || current_info.status[port_no] != CELL_KB_STATUS_CONNECTED) - return CELL_KB_ERROR_NO_DEVICE; + return not_an_error(CELL_KB_ERROR_NO_DEVICE); // tests show that config is checked only after the device's status if (!config) diff --git a/rpcs3/Emu/Cell/Modules/cellMouse.cpp b/rpcs3/Emu/Cell/Modules/cellMouse.cpp index 467e00dd99..3f7803ecd7 100644 --- a/rpcs3/Emu/Cell/Modules/cellMouse.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMouse.cpp @@ -104,7 +104,7 @@ error_code cellMouseClearBuf(u32 port_no) if (port_no >= handler.GetMice().size() || current_info.status[port_no] != CELL_MOUSE_STATUS_CONNECTED) { - return CELL_MOUSE_ERROR_NO_DEVICE; + return not_an_error(CELL_MOUSE_ERROR_NO_DEVICE); } handler.GetDataList(port_no).clear(); @@ -229,7 +229,7 @@ error_code cellMouseGetData(u32 port_no, vm::ptr data) if (port_no >= handler.GetMice().size() || current_info.status[port_no] != CELL_MOUSE_STATUS_CONNECTED) { - return CELL_MOUSE_ERROR_NO_DEVICE; + return not_an_error(CELL_MOUSE_ERROR_NO_DEVICE); } std::memset(data.get_ptr(), 0, data.size()); @@ -279,7 +279,7 @@ error_code cellMouseGetDataList(u32 port_no, vm::ptr data) if (port_no >= handler.GetMice().size() || current_info.status[port_no] != CELL_MOUSE_STATUS_CONNECTED) { - return CELL_MOUSE_ERROR_NO_DEVICE; + return not_an_error(CELL_MOUSE_ERROR_NO_DEVICE); } std::memset(data.get_ptr(), 0, data.size()); @@ -368,7 +368,7 @@ error_code cellMouseGetTabletDataList(u32 port_no, vm::ptr= handler.GetMice().size() || current_info.status[port_no] != CELL_MOUSE_STATUS_CONNECTED) { - return CELL_MOUSE_ERROR_NO_DEVICE; + return not_an_error(CELL_MOUSE_ERROR_NO_DEVICE); } std::memset(data.get_ptr(), 0, data.size()); @@ -424,7 +424,7 @@ error_code cellMouseGetRawData(u32 port_no, vm::ptr data) if (port_no >= handler.GetMice().size() || current_info.status[port_no] != CELL_MOUSE_STATUS_CONNECTED) { - return CELL_MOUSE_ERROR_NO_DEVICE; + return not_an_error(CELL_MOUSE_ERROR_NO_DEVICE); } std::memset(data.get_ptr(), 0, data.size()); diff --git a/rpcs3/Emu/Cell/Modules/cellPad.cpp b/rpcs3/Emu/Cell/Modules/cellPad.cpp index cdd7f4157a..8cca96bc7f 100644 --- a/rpcs3/Emu/Cell/Modules/cellPad.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPad.cpp @@ -504,7 +504,7 @@ error_code cellPadPeriphGetData(u32 port_no, vm::ptr data) const auto& pad = pads[port_no]; if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED)) - return CELL_PAD_ERROR_NO_DEVICE; + return not_an_error(CELL_PAD_ERROR_NO_DEVICE); pad_get_data(port_no, &data->cellpad_data); @@ -753,7 +753,7 @@ error_code cellPadGetCapabilityInfo(u32 port_no, vm::ptr const auto pad = pads[port_no]; if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED)) - return CELL_PAD_ERROR_NO_DEVICE; + return not_an_error(CELL_PAD_ERROR_NO_DEVICE); // Should return the same as device capability mask, psl1ght has it backwards in pad->h memset(info->info, 0, CELL_PAD_MAX_CAPABILITY_INFO * sizeof(u32)); @@ -811,7 +811,7 @@ error_code cellPadInfoPressMode(u32 port_no) const auto pad = pads[port_no]; if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED)) - return CELL_PAD_ERROR_NO_DEVICE; + return not_an_error(CELL_PAD_ERROR_NO_DEVICE); return not_an_error((pad->m_device_capability & CELL_PAD_CAPABILITY_PRESS_MODE) ? 1 : 0); } @@ -840,7 +840,7 @@ error_code cellPadInfoSensorMode(u32 port_no) const auto pad = pads[port_no]; if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED)) - return CELL_PAD_ERROR_NO_DEVICE; + return not_an_error(CELL_PAD_ERROR_NO_DEVICE); return not_an_error((pad->m_device_capability & CELL_PAD_CAPABILITY_SENSOR_MODE) ? 1 : 0); }