From 21f7b0ff0faffbf4911183aad0416ad21d531f69 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 1 Feb 2020 11:23:50 +0300 Subject: [PATCH] Remove HLE log channel --- Utilities/Log.h | 1 - rpcs3/Emu/Cell/Modules/cellAdec.cpp | 6 ++--- rpcs3/Emu/Cell/Modules/cellCamera.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellDmux.cpp | 2 +- rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp | 18 +++++++------- rpcs3/Emu/Cell/lv2/lv2.cpp | 4 +-- rpcs3/Emu/Io/PadHandler.cpp | 18 ++++++++------ rpcs3/Input/ds3_pad_handler.cpp | 14 ++++++----- rpcs3/Input/ds4_pad_handler.cpp | 22 +++++++++-------- rpcs3/Input/evdev_joystick_handler.cpp | 26 ++++++++++---------- rpcs3/Input/mm_joystick_handler.cpp | 8 +++--- rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp | 16 ++++++------ rpcs3/rpcs3qt/pad_settings_dialog.cpp | 10 ++++---- 13 files changed, 77 insertions(+), 70 deletions(-) diff --git a/Utilities/Log.h b/Utilities/Log.h index bf2a5c1887..611388b7e9 100644 --- a/Utilities/Log.h +++ b/Utilities/Log.h @@ -122,7 +122,6 @@ namespace logs namespace logs { /* Small set of predefined channels */ - LOG_CHANNEL(HLE); LOG_CHANNEL(PPU); LOG_CHANNEL(SPU); } diff --git a/rpcs3/Emu/Cell/Modules/cellAdec.cpp b/rpcs3/Emu/Cell/Modules/cellAdec.cpp index 6cff7f5a9f..c928867a37 100644 --- a/rpcs3/Emu/Cell/Modules/cellAdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAdec.cpp @@ -453,7 +453,7 @@ public: reader.addr = task.au.addr; reader.size = task.au.size; reader.has_ats = use_ats_headers; - //LOG_NOTICE(HLE, "Audio AU: size = 0x%x, pts = 0x%llx", task.au.size, task.au.pts); + //cellAdec.notice("Audio AU: size = 0x%x, pts = 0x%llx", task.au.size, task.au.pts); if (just_started) { @@ -610,7 +610,7 @@ public: frame.userdata = task.au.userdata; frame.size = frame.data->nb_samples * frame.data->channels * nbps; - //LOG_NOTICE(HLE, "got audio frame (pts=0x%llx, nb_samples=%d, ch=%d, sample_rate=%d, nbps=%d)", + //cellAdec.notice("got audio frame (pts=0x%llx, nb_samples=%d, ch=%d, sample_rate=%d, nbps=%d)", //frame.pts, frame.data->nb_samples, frame.data->channels, frame.data->sample_rate, nbps); if (frames.push(frame, &is_closed)) @@ -714,7 +714,7 @@ next: adec.reader.addr = adec.task.au.addr; adec.reader.size = adec.task.au.size; adec.reader.has_ats = adec.use_ats_headers; - //LOG_NOTICE(HLE, "Audio AU: size = 0x%x, pts = 0x%llx", adec.task.au.size, adec.task.au.pts); + //cellAdec.notice("Audio AU: size = 0x%x, pts = 0x%llx", adec.task.au.size, adec.task.au.pts); } break; diff --git a/rpcs3/Emu/Cell/Modules/cellCamera.cpp b/rpcs3/Emu/Cell/Modules/cellCamera.cpp index 7c1fa0be0a..b07dcc99b5 100644 --- a/rpcs3/Emu/Cell/Modules/cellCamera.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCamera.cpp @@ -1403,7 +1403,7 @@ void camera_context::set_attr(s32 attrib, u32 arg1, u32 arg2) { if (arg1 != CELL_CAMERA_READ_FUNCCALL && arg1 != CELL_CAMERA_READ_DIRECT) { - LOG_WARNING(HLE, "Unknown read mode set: %d", arg1); + cellCamera.warning("Unknown read mode set: %d", arg1); arg1 = CELL_CAMERA_READ_FUNCCALL; } read_mode.exchange(arg1); diff --git a/rpcs3/Emu/Cell/Modules/cellDmux.cpp b/rpcs3/Emu/Cell/Modules/cellDmux.cpp index 4d33a37e6e..466e417156 100644 --- a/rpcs3/Emu/Cell/Modules/cellDmux.cpp +++ b/rpcs3/Emu/Cell/Modules/cellDmux.cpp @@ -524,7 +524,7 @@ public: } stream = task.stream; - //LOG_NOTICE(HLE, "*** stream updated(addr=0x%x, size=0x%x, discont=%d, userdata=0x%llx)", + //cellDmux.notice("*** stream updated(addr=0x%x, size=0x%x, discont=%d, userdata=0x%llx)", //stream.addr, stream.size, stream.discontinuity, stream.userdata); break; } diff --git a/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp b/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp index a436253568..6d5f4fc86f 100644 --- a/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp +++ b/rpcs3/Emu/Cell/Modules/sysPrxForUser.cpp @@ -112,31 +112,31 @@ error_code console_write(vm::ptr data, u32 len) s32 cellGamePs1Emu_61CE2BCD() { - UNIMPLEMENTED_FUNC(logs::HLE); + UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } s32 cellSysconfPs1emu_639ABBDE() { - UNIMPLEMENTED_FUNC(logs::HLE); + UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } s32 cellSysconfPs1emu_6A12D11F() { - UNIMPLEMENTED_FUNC(logs::HLE); + UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } s32 cellSysconfPs1emu_83E79A23() { - UNIMPLEMENTED_FUNC(logs::HLE); + UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } s32 cellSysconfPs1emu_EFDDAF6C() { - UNIMPLEMENTED_FUNC(logs::HLE); + UNIMPLEMENTED_FUNC(sysPrxForUser); return CELL_OK; } @@ -171,25 +171,25 @@ error_code sys_crash_dump_set_user_log_area(u8 index, vm::ptr::format(std::string& out, u64 arg) static bool null_func(ppu_thread& ppu) { - LOG_TODO(HLE, "Unimplemented syscall %s -> CELL_OK", ppu_syscall_code(ppu.gpr[11])); + LOG_TODO(PPU, "Unimplemented syscall %s -> CELL_OK", ppu_syscall_code(ppu.gpr[11])); ppu.gpr[3] = 0; ppu.cia += 4; return false; @@ -55,7 +55,7 @@ static bool null_func(ppu_thread& ppu) static bool uns_func(ppu_thread& ppu) { - LOG_TRACE(HLE, "Unused syscall %d -> ENOSYS", ppu.gpr[11]); + LOG_TRACE(PPU, "Unused syscall %d -> ENOSYS", ppu.gpr[11]); ppu.gpr[3] = CELL_ENOSYS; ppu.cia += 4; return false; diff --git a/rpcs3/Emu/Io/PadHandler.cpp b/rpcs3/Emu/Io/PadHandler.cpp index 0d2b433588..29a193bd0d 100644 --- a/rpcs3/Emu/Io/PadHandler.cpp +++ b/rpcs3/Emu/Io/PadHandler.cpp @@ -4,6 +4,8 @@ cfg_input g_cfg_input; +LOG_CHANNEL(input_log, "Input"); + PadHandlerBase::PadHandlerBase(pad_handler type) : m_type(type) { } @@ -26,7 +28,7 @@ int PadHandlerBase::FindKeyCode(const std::unordered_map& map, if (fallback) { - LOG_ERROR(HLE, "int FindKeyCode for [name = %s] returned with [def_code = %d] for [def = %s]", nam, def_code, def); + input_log.error("int FindKeyCode for [name = %s] returned with [def_code = %d] for [def = %s]", nam, def_code, def); if (def_code < 0) def_code = 0; } @@ -51,7 +53,7 @@ long PadHandlerBase::FindKeyCode(const std::unordered_map& map if (fallback) { - LOG_ERROR(HLE, "long FindKeyCode for [name = %s] returned with [def_code = %d] for [def = %s]", nam, def_code, def); + input_log.error("long FindKeyCode for [name = %s] returned with [def_code = %d] for [def = %s]", nam, def_code, def); if (def_code < 0) def_code = 0; } @@ -70,7 +72,7 @@ int PadHandlerBase::FindKeyCodeByString(const std::unordered_map pressed_button.first) pressed_button = { value, button.second }; @@ -354,7 +356,7 @@ void PadHandlerBase::get_next_button_press(const std::string& pad_id, const std: if (get_blacklist) { if (blacklist.empty()) - LOG_SUCCESS(HLE, "%s Calibration: Blacklist is clear. No input spam detected", m_type); + input_log.success("%s Calibration: Blacklist is clear. No input spam detected", m_type); return; } @@ -586,7 +588,7 @@ void PadHandlerBase::ThreadProc() { if (!last_connection_status[i]) { - LOG_SUCCESS(HLE, "%s device %d connected", m_type, i); + input_log.success("%s device %d connected", m_type, i); pad->m_port_status |= CELL_PAD_STATUS_CONNECTED; pad->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES; last_connection_status[i] = true; @@ -602,7 +604,7 @@ void PadHandlerBase::ThreadProc() { if (last_connection_status[i]) { - LOG_ERROR(HLE, "%s device %d disconnected", m_type, i); + input_log.error("%s device %d disconnected", m_type, i); pad->m_port_status &= ~CELL_PAD_STATUS_CONNECTED; pad->m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES; last_connection_status[i] = false; diff --git a/rpcs3/Input/ds3_pad_handler.cpp b/rpcs3/Input/ds3_pad_handler.cpp index dae4d4a70c..dd28cff24d 100644 --- a/rpcs3/Input/ds3_pad_handler.cpp +++ b/rpcs3/Input/ds3_pad_handler.cpp @@ -2,6 +2,8 @@ #include +LOG_CHANNEL(ds3_log, "DS3"); + ds3_pad_handler::ds3_pad_handler() : PadHandlerBase(pad_handler::ds3) { button_list = @@ -67,7 +69,7 @@ bool ds3_pad_handler::init_usb() { if (hid_init() != 0) { - LOG_FATAL(HLE, "[DS3] Failed to init hidapi for the DS3 pad handler"); + ds3_log.fatal("Failed to init hidapi for the DS3 pad handler"); return false; } return true; @@ -118,18 +120,18 @@ bool ds3_pad_handler::Init() if (warn_about_drivers) { - LOG_ERROR(HLE, "[DS3] One or more DS3 pads were detected but couldn't be interacted with directly"); + ds3_log.error("One or more DS3 pads were detected but couldn't be interacted with directly"); #if defined(_WIN32) || defined(__linux__) - LOG_ERROR(HLE, "[DS3] Check https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration for intructions on how to solve this issue"); + ds3_log.error("Check https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration for intructions on how to solve this issue"); #endif } else if (controllers.empty()) { - LOG_WARNING(HLE, "[DS3] No controllers found!"); + ds3_log.warning("No controllers found!"); } else { - LOG_SUCCESS(HLE, "[DS3] Controllers found: %d", controllers.size()); + ds3_log.success("Controllers found: %d", controllers.size()); } is_init = true; @@ -301,7 +303,7 @@ ds3_pad_handler::DS3Status ds3_pad_handler::get_data(const std::shared_ptr +LOG_CHANNEL(ds4_log, "DS4"); + namespace { const auto THREAD_SLEEP = 1ms; //ds4 has new data every ~4ms, @@ -242,7 +244,7 @@ std::shared_ptr ds4_pad_handler::GetDS4Device(const if (device->hidDevice) { hid_set_nonblocking(device->hidDevice, 1); - LOG_NOTICE(HLE, "DS4 device %d reconnected", i); + ds4_log.notice("DS4 device %d reconnected", i); } } break; @@ -387,7 +389,7 @@ bool ds4_pad_handler::GetCalibrationData(const std::shared_ptr& ds4De const u32 crcCalc = CRCPP::CRC::Calculate(buf.data(), (DS4_FEATURE_REPORT_0x05_SIZE - 4), crcTable, crcHdr); const u32 crcReported = read_u32(&buf[DS4_FEATURE_REPORT_0x05_SIZE - 4]); if (crcCalc != crcReported) - LOG_WARNING(HLE, "[DS4] Calibration CRC check failed! Will retry up to 3 times. Received 0x%x, Expected 0x%x", crcReported, crcCalc); + ds4_log.warning("Calibration CRC check failed! Will retry up to 3 times. Received 0x%x, Expected 0x%x", crcReported, crcCalc); else break; if (tries == 2) return false; @@ -398,7 +400,7 @@ bool ds4_pad_handler::GetCalibrationData(const std::shared_ptr& ds4De buf[0] = 0x02; if (hid_get_feature_report(ds4Dev->hidDevice, buf.data(), DS4_FEATURE_REPORT_0x02_SIZE) <= 0) { - LOG_ERROR(HLE, "[DS4] Failed getting calibration data report!"); + ds4_log.error("Failed getting calibration data report!"); return false; } } @@ -497,7 +499,7 @@ void ds4_pad_handler::CheckAddDevice(hid_device* hidDevice, hid_device_info* hid if (length != DS4_FEATURE_REPORT_0x81_SIZE) { // Controller may not be genuine. These controllers do not have feature 0x81 implemented and calibration data is in bluetooth format even in USB mode! - LOG_WARNING(HLE, "DS4 controller may not be genuine. Workaround enabled."); + ds4_log.warning("DS4 controller may not be genuine. Workaround enabled."); // Read feature report 0x12 instead which is what the console uses. buf[0] = 0x12; @@ -628,7 +630,7 @@ bool ds4_pad_handler::Init() } else { - LOG_ERROR(HLE, "[DS4] hid_open_path failed! Reason: %s", hid_error(dev)); + ds4_log.error("hid_open_path failed! Reason: %s", hid_error(dev)); warn_about_drivers = true; } devInfo = devInfo->next; @@ -638,18 +640,18 @@ bool ds4_pad_handler::Init() if (warn_about_drivers) { - LOG_ERROR(HLE, "[DS4] One or more DS4 pads were detected but couldn't be interacted with directly"); + ds4_log.error("One or more DS4 pads were detected but couldn't be interacted with directly"); #if defined(_WIN32) || defined(__linux__) - LOG_ERROR(HLE, "[DS4] Check https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration for intructions on how to solve this issue"); + ds4_log.error("Check https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration for intructions on how to solve this issue"); #endif } else if (controllers.empty()) { - LOG_WARNING(HLE, "[DS4] No controllers found!"); + ds4_log.warning("No controllers found!"); } else { - LOG_SUCCESS(HLE, "[DS4] Controllers found: %d", controllers.size()); + ds4_log.success("Controllers found: %d", controllers.size()); } is_init = true; @@ -711,7 +713,7 @@ ds4_pad_handler::DS4DataStatus ds4_pad_handler::GetRawData(const std::shared_ptr const u32 crcReported = read_u32(&buf[DS4_INPUT_REPORT_0x11_SIZE - 4]); if (crcCalc != crcReported) { - LOG_WARNING(HLE, "[DS4] Data packet CRC check failed, ignoring! Received 0x%x, Expected 0x%x", crcReported, crcCalc); + ds4_log.warning("Data packet CRC check failed, ignoring! Received 0x%x, Expected 0x%x", crcReported, crcCalc); return DS4DataStatus::NoNewData; } } diff --git a/rpcs3/Input/evdev_joystick_handler.cpp b/rpcs3/Input/evdev_joystick_handler.cpp index c3926cb9c8..5c3b80a4b1 100644 --- a/rpcs3/Input/evdev_joystick_handler.cpp +++ b/rpcs3/Input/evdev_joystick_handler.cpp @@ -107,7 +107,7 @@ bool evdev_joystick_handler::Init() std::string name = node.first; int code = libevdev_event_code_from_name(EV_ABS, name.c_str()); if (code < 0) - LOG_ERROR(HLE, "Failed to read axis name from %s. [code = %d] [name = %s]", m_pos_axis_config.cfg_name, code, name); + evdev_log.error("Failed to read axis name from %s. [code = %d] [name = %s]", m_pos_axis_config.cfg_name, code, name); else m_positive_axis.emplace_back(code); } @@ -342,7 +342,7 @@ void evdev_joystick_handler::get_next_button_press(const std::string& padId, con if (get_blacklist) { blacklist.emplace_back(name); - LOG_ERROR(HLE, "Evdev Calibration: Added button [ %d = %s = %s ] to blacklist. Value = %d", code, libevdev_event_code_get_name(EV_KEY, code), name, value); + evdev_log.error("Evdev Calibration: Added button [ %d = %s = %s ] to blacklist. Value = %d", code, libevdev_event_code_get_name(EV_KEY, code), name, value); } else if (value > pressed_button.first) pressed_button = { value, name }; @@ -368,7 +368,7 @@ void evdev_joystick_handler::get_next_button_press(const std::string& padId, con int min = libevdev_get_abs_minimum(dev, code); int max = libevdev_get_abs_maximum(dev, code); blacklist.emplace_back(name); - LOG_ERROR(HLE, "Evdev Calibration: Added axis [ %d = %s = %s ] to blacklist. [ Value = %d ] [ Min = %d ] [ Max = %d ]", code, libevdev_event_code_get_name(EV_ABS, code), name, value, min, max); + evdev_log.error("Evdev Calibration: Added axis [ %d = %s = %s ] to blacklist. [ Value = %d ] [ Min = %d ] [ Max = %d ]", code, libevdev_event_code_get_name(EV_ABS, code), name, value, min, max); } else if (value > pressed_button.first) pressed_button = { value, name }; @@ -394,7 +394,7 @@ void evdev_joystick_handler::get_next_button_press(const std::string& padId, con int min = libevdev_get_abs_minimum(dev, code); int max = libevdev_get_abs_maximum(dev, code); blacklist.emplace_back(name); - LOG_ERROR(HLE, "Evdev Calibration: Added rev axis [ %d = %s = %s ] to blacklist. [ Value = %d ] [ Min = %d ] [ Max = %d ]", code, libevdev_event_code_get_name(EV_ABS, code), name, value, min, max); + evdev_log.error("Evdev Calibration: Added rev axis [ %d = %s = %s ] to blacklist. [ Value = %d ] [ Min = %d ] [ Max = %d ]", code, libevdev_event_code_get_name(EV_ABS, code), name, value, min, max); } else if (value > pressed_button.first) pressed_button = { value, name }; @@ -404,7 +404,7 @@ void evdev_joystick_handler::get_next_button_press(const std::string& padId, con if (get_blacklist) { if (blacklist.empty()) - LOG_SUCCESS(HLE, "Evdev Calibration: Blacklist is clear. No input spam detected"); + evdev_log.success("Evdev Calibration: Blacklist is clear. No input spam detected"); return; } @@ -473,7 +473,7 @@ void evdev_joystick_handler::SetRumble(std::shared_ptrdevice, u16 l if (ioctl(fd, EVIOCSFF, &effect) == -1) { - LOG_ERROR(HLE, "evdev SetRumble ioctl failed! [large = %d] [small = %d] [fd = %d]", large, small, fd); + evdev_log.error("evdev SetRumble ioctl failed! [large = %d] [small = %d] [fd = %d]", large, small, fd); device->effect_id = -2; } @@ -486,7 +486,7 @@ void evdev_joystick_handler::SetRumble(std::shared_ptrdevice, u16 l if (write(fd, &play, sizeof(play)) == -1) { - LOG_ERROR(HLE, "evdev SetRumble write failed! [large = %d] [small = %d] [fd = %d] [effect_id = %d]", large, small, fd, device->effect_id); + evdev_log.error("evdev SetRumble write failed! [large = %d] [small = %d] [fd = %d] [effect_id = %d]", large, small, fd, device->effect_id); device->effect_id = -2; } @@ -500,13 +500,13 @@ void evdev_joystick_handler::SetPadData(const std::string& padId, u32 largeMotor auto dev = get_evdev_device(padId); if (!dev) { - LOG_ERROR(HLE, "evdev TestVibration: Device [%s] not found! [largeMotor = %d] [smallMotor = %d]", padId, largeMotor, smallMotor); + evdev_log.error("evdev TestVibration: Device [%s] not found! [largeMotor = %d] [smallMotor = %d]", padId, largeMotor, smallMotor); return; } if (!dev->has_rumble) { - LOG_ERROR(HLE, "evdev TestVibration: Device [%s] does not support rumble features! [largeMotor = %d] [smallMotor = %d]", padId, largeMotor, smallMotor); + evdev_log.error("evdev TestVibration: Device [%s] does not support rumble features! [largeMotor = %d] [smallMotor = %d]", padId, largeMotor, smallMotor); return; } @@ -751,7 +751,7 @@ void evdev_joystick_handler::get_mapping(const std::shared_ptr& devic if (direction < 0) { - LOG_ERROR(HLE, "FindAxisDirection = %d, Button Nr.%d, value = %d", direction, i, value); + evdev_log.error("FindAxisDirection = %d, Button Nr.%d, value = %d", direction, i, value); continue; } else if (direction != (m_is_negative ? 1 : 0)) @@ -784,7 +784,7 @@ void evdev_joystick_handler::get_mapping(const std::shared_ptr& devic m_dev->cur_dir = min_direction; if (min_direction < 0) - LOG_ERROR(HLE, "keyCodeMin FindAxisDirection = %d, Axis Nr.%d, Button Nr.%d, value = %d", min_direction, idx, index, value); + evdev_log.error("keyCodeMin FindAxisDirection = %d, Axis Nr.%d, Button Nr.%d, value = %d", min_direction, idx, index, value); else is_direction_min = m_is_negative == (min_direction == 1); } @@ -810,7 +810,7 @@ void evdev_joystick_handler::get_mapping(const std::shared_ptr& devic m_dev->cur_dir = max_direction; if (max_direction < 0) - LOG_ERROR(HLE, "keyCodeMax FindAxisDirection = %d, Axis Nr.%d, Button Nr.%d, value = %d", max_direction, idx, index, value); + evdev_log.error("keyCodeMax FindAxisDirection = %d, Axis Nr.%d, Button Nr.%d, value = %d", max_direction, idx, index, value); else is_direction_max = m_is_negative == (max_direction == 1); } @@ -989,7 +989,7 @@ bool evdev_joystick_handler::bindPadToDevice(std::shared_ptr pad, const std m_dev->axis_orientations = axis_orientations; if (add_device(device, pad, false) < 0) - LOG_WARNING(HLE, "evdev add_device in bindPadToDevice failed for device %s", device); + evdev_log.warning("evdev add_device in bindPadToDevice failed for device %s", device); update_devs(); return true; diff --git a/rpcs3/Input/mm_joystick_handler.cpp b/rpcs3/Input/mm_joystick_handler.cpp index 6efba98c84..fd3ece17a6 100644 --- a/rpcs3/Input/mm_joystick_handler.cpp +++ b/rpcs3/Input/mm_joystick_handler.cpp @@ -234,7 +234,7 @@ void mm_joystick_handler::get_next_button_press(const std::string& padId, const if (get_blacklist) { blacklist.emplace_back(keycode); - LOG_ERROR(HLE, "MMJOY Calibration: Added axis [ %d = %s ] to blacklist. Value = %d", keycode, button.second, value); + input_log.error("MMJOY Calibration: Added axis [ %d = %s ] to blacklist. Value = %d", keycode, button.second, value); } else if (value > pressed_button.first) pressed_button = { value, button.second }; @@ -254,7 +254,7 @@ void mm_joystick_handler::get_next_button_press(const std::string& padId, const if (get_blacklist) { blacklist.emplace_back(keycode); - LOG_ERROR(HLE, "MMJOY Calibration: Added pov [ %d = %s ] to blacklist. Value = %d", keycode, button.second, value); + input_log.error("MMJOY Calibration: Added pov [ %d = %s ] to blacklist. Value = %d", keycode, button.second, value); } else if (value > pressed_button.first) pressed_button = { value, button.second }; @@ -274,7 +274,7 @@ void mm_joystick_handler::get_next_button_press(const std::string& padId, const if (get_blacklist) { blacklist.emplace_back(keycode); - LOG_ERROR(HLE, "MMJOY Calibration: Added button [ %d = %s ] to blacklist. Value = %d", keycode, button.second, value); + input_log.error("MMJOY Calibration: Added button [ %d = %s ] to blacklist. Value = %d", keycode, button.second, value); } else if (value > pressed_button.first) pressed_button = { value, button.second }; @@ -284,7 +284,7 @@ void mm_joystick_handler::get_next_button_press(const std::string& padId, const if (get_blacklist) { if (blacklist.empty()) - LOG_SUCCESS(HLE, "MMJOY Calibration: Blacklist is clear. No input spam detected"); + input_log.success("MMJOY Calibration: Blacklist is clear. No input spam detected"); return; } diff --git a/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp b/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp index 3ecd14661f..aece2a70d0 100644 --- a/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp @@ -1,6 +1,8 @@  #include "auto_pause_settings_dialog.h" +LOG_CHANNEL(autopause_log, "AutoPause"); + constexpr auto qstr = QString::fromStdString; auto_pause_settings_dialog::auto_pause_settings_dialog(QWidget *parent) : QDialog(parent) @@ -46,7 +48,7 @@ auto_pause_settings_dialog::auto_pause_settings_dialog(QWidget *parent) : QDialo connect(saveButton, &QAbstractButton::clicked, [=] { SaveEntries(); - LOG_SUCCESS(HLE, "Auto Pause: File pause.bin was updated."); + autopause_log.success("File pause.bin was updated."); }); connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close); @@ -115,7 +117,7 @@ void auto_pause_settings_dialog::UpdateList(void) callItem->setFlags(callItem->flags() & ~Qt::ItemIsEditable); typeItem->setFlags(typeItem->flags() & ~Qt::ItemIsEditable); if (m_entries[i] != 0xFFFFFFFF) - { + { callItem->setData(Qt::DisplayRole, qstr(fmt::format("%08x", m_entries[i]))); } else @@ -195,7 +197,7 @@ void auto_pause_settings_dialog::keyPressEvent(QKeyEvent *event) } } -AutoPauseConfigDialog::AutoPauseConfigDialog(QWidget* parent, auto_pause_settings_dialog* apsd, bool newEntry, u32 *entry) +AutoPauseConfigDialog::AutoPauseConfigDialog(QWidget* parent, auto_pause_settings_dialog* apsd, bool newEntry, u32 *entry) : QDialog(parent), m_presult(entry), m_newEntry(newEntry), m_apsd(apsd) { m_entry = *m_presult; @@ -211,7 +213,7 @@ AutoPauseConfigDialog::AutoPauseConfigDialog(QWidget* parent, auto_pause_setting m_current_converted = new QLabel(tr("Currently it gets an id of \"Unset\"."), this); m_current_converted->setWordWrap(true); - + m_id = new QLineEdit(this); m_id->setText(qstr(fmt::format("%08x", m_entry))); m_id->setPlaceholderText("ffffffff"); @@ -219,7 +221,7 @@ AutoPauseConfigDialog::AutoPauseConfigDialog(QWidget* parent, auto_pause_setting m_id->setMaxLength(8); m_id->setFixedWidth(65); setWindowTitle("Auto Pause Setting: " + m_id->text()); - + connect(button_cancel, &QAbstractButton::clicked, this, &AutoPauseConfigDialog::OnCancel); connect(button_ok, &QAbstractButton::clicked, this, &AutoPauseConfigDialog::OnOk); connect(m_id, &QLineEdit::textChanged, this, &AutoPauseConfigDialog::OnUpdateValue); @@ -229,7 +231,7 @@ AutoPauseConfigDialog::AutoPauseConfigDialog(QWidget* parent, auto_pause_setting configHBox->addWidget(button_ok); configHBox->addWidget(button_cancel); configHBox->setAlignment(Qt::AlignCenter); - + QVBoxLayout* mainLayout = new QVBoxLayout(this); mainLayout->addWidget(description); mainLayout->addLayout(configHBox); @@ -266,6 +268,6 @@ void AutoPauseConfigDialog::OnUpdateValue() bool ok; ullong value = m_id->text().toULongLong(&ok, 16); const bool is_ok = ok && value <= UINT32_MAX; - + m_current_converted->setText(qstr(fmt::format("Current value: %08x (%s)", u32(value), is_ok ? "OK" : "conversion failed"))); } diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.cpp b/rpcs3/rpcs3qt/pad_settings_dialog.cpp index cbb20f092e..c478ec288c 100644 --- a/rpcs3/rpcs3qt/pad_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/pad_settings_dialog.cpp @@ -387,7 +387,7 @@ void pad_settings_dialog::InitButtons() return; } - LOG_NOTICE(HLE, "get_next_button_press: %s device %s button %s pressed with value %d", m_handler->m_type, pad_name, name, val); + cfg_log.notice("get_next_button_press: %s device %s button %s pressed with value %d", m_handler->m_type, pad_name, name, val); if (m_button_id > button_ids::id_pad_begin && m_button_id < button_ids::id_pad_end) { m_cfg_entries[m_button_id].key = name; @@ -658,7 +658,7 @@ void pad_settings_dialog::keyPressEvent(QKeyEvent *keyEvent) if (m_button_id <= button_ids::id_pad_begin || m_button_id >= button_ids::id_pad_end) { - LOG_NOTICE(HLE, "Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); + cfg_log.notice("Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); } else { @@ -683,7 +683,7 @@ void pad_settings_dialog::mouseReleaseEvent(QMouseEvent* event) if (m_button_id <= button_ids::id_pad_begin || m_button_id >= button_ids::id_pad_end) { - LOG_NOTICE(HLE, "Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); + cfg_log.notice("Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); } else { @@ -708,7 +708,7 @@ void pad_settings_dialog::wheelEvent(QWheelEvent *event) if (m_button_id <= button_ids::id_pad_begin || m_button_id >= button_ids::id_pad_end) { - LOG_NOTICE(HLE, "Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); + cfg_log.notice("Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); return; } @@ -764,7 +764,7 @@ void pad_settings_dialog::mouseMoveEvent(QMouseEvent* /*event*/) if (m_button_id <= button_ids::id_pad_begin || m_button_id >= button_ids::id_pad_end) { - LOG_NOTICE(HLE, "Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); + cfg_log.notice("Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); } else {