Remove HLE log channel

This commit is contained in:
Nekotekina 2020-02-01 11:23:50 +03:00
parent 15391f45d0
commit 21f7b0ff0f
13 changed files with 77 additions and 70 deletions

View file

@ -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_ptr<EvdevDevice>device, 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_ptr<EvdevDevice>device, 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<PadDevice>& 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<PadDevice>& 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<PadDevice>& 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> 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;