mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 17:11:23 +00:00
Input: fix build
This commit is contained in:
parent
f0b7afd7cc
commit
1479468730
@ -222,6 +222,7 @@ void ds3_pad_handler::check_add_device(hid_device* hidDevice, std::string_view p
|
||||
hid_close(hidDevice);
|
||||
return;
|
||||
}
|
||||
device->report_id = buf[0];
|
||||
#endif
|
||||
|
||||
{
|
||||
@ -236,7 +237,6 @@ void ds3_pad_handler::check_add_device(hid_device* hidDevice, std::string_view p
|
||||
return;
|
||||
}
|
||||
|
||||
device->report_id = buf[0];
|
||||
device->path = path;
|
||||
device->hidDevice = hidDevice;
|
||||
|
||||
|
@ -84,9 +84,9 @@ public:
|
||||
void init_config(pad_config* cfg, const std::string& name) override;
|
||||
|
||||
private:
|
||||
ds3_pad_handler::DataStatus get_data(ds3_device* ds3dev);
|
||||
int send_output_report(ds3_device* ds3dev);
|
||||
void check_add_device(hid_device* hidDevice, std::string_view path, std::wstring_view serial);
|
||||
ds3_pad_handler::DataStatus get_data(ds3_device* ds3dev) override;
|
||||
int send_output_report(ds3_device* ds3dev) override;
|
||||
void check_add_device(hid_device* hidDevice, std::string_view path, std::wstring_view serial) override;
|
||||
|
||||
bool get_is_left_trigger(u64 keyCode) override;
|
||||
bool get_is_right_trigger(u64 keyCode) override;
|
||||
|
@ -67,13 +67,13 @@ public:
|
||||
private:
|
||||
u32 get_battery_color(u8 battery_level, int brightness);
|
||||
|
||||
// Copies data into padData if status is NewData, otherwise buffer is untouched
|
||||
DataStatus get_data(DS4Device* ds4Device);
|
||||
// This function gets us usuable buffer from the rawbuffer of padData
|
||||
bool GetCalibrationData(DS4Device* ds4Device);
|
||||
int send_output_report(DS4Device* device);
|
||||
|
||||
void check_add_device(hid_device* hidDevice, std::string_view path, std::wstring_view serial);
|
||||
// Copies data into padData if status is NewData, otherwise buffer is untouched
|
||||
DataStatus get_data(DS4Device* ds4Device) override;
|
||||
int send_output_report(DS4Device* device) override;
|
||||
void check_add_device(hid_device* hidDevice, std::string_view path, std::wstring_view serial) override;
|
||||
|
||||
bool get_is_left_trigger(u64 keyCode) override;
|
||||
bool get_is_right_trigger(u64 keyCode) override;
|
||||
|
@ -69,11 +69,12 @@ public:
|
||||
void init_config(pad_config* cfg, const std::string& name) override;
|
||||
|
||||
private:
|
||||
DataStatus get_data(DualSenseDevice* dualsenseDevice);
|
||||
bool get_calibration_data(DualSenseDevice* dualsense_device);
|
||||
|
||||
void check_add_device(hid_device* hidDevice, std::string_view path, std::wstring_view wide_serial);
|
||||
int send_output_report(DualSenseDevice* device);
|
||||
DataStatus get_data(DualSenseDevice* dualsenseDevice) override;
|
||||
void check_add_device(hid_device* hidDevice, std::string_view path, std::wstring_view wide_serial) override;
|
||||
int send_output_report(DualSenseDevice* device) override;
|
||||
|
||||
bool get_is_left_trigger(u64 keyCode) override;
|
||||
bool get_is_right_trigger(u64 keyCode) override;
|
||||
bool get_is_left_stick(u64 keyCode) override;
|
||||
|
@ -28,7 +28,7 @@ hid_pad_handler<Device>::~hid_pad_handler()
|
||||
|
||||
if (hid_exit() != 0)
|
||||
{
|
||||
hid_log.error("hid_exit failed!");
|
||||
hid_log.error("%s hid_exit failed!", m_type);
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ bool hid_pad_handler<Device>::Init()
|
||||
|
||||
const int res = hid_init();
|
||||
if (res != 0)
|
||||
fmt::throw_exception("hidapi-init error.threadproc");
|
||||
fmt::throw_exception("%s hidapi-init error.threadproc", m_type);
|
||||
|
||||
for (size_t i = 1; i <= MAX_GAMEPADS; i++) // Controllers 1-n in GUI
|
||||
{
|
||||
@ -146,7 +146,7 @@ void hid_pad_handler<Device>::enumerate_devices()
|
||||
}
|
||||
else
|
||||
{
|
||||
hid_log.error("hid_open_path failed! Reason: %s", hid_error(dev));
|
||||
hid_log.error("%s hid_open_path failed! Reason: %s", m_type, hid_error(dev));
|
||||
warn_about_drivers = true;
|
||||
}
|
||||
}
|
||||
@ -154,7 +154,7 @@ void hid_pad_handler<Device>::enumerate_devices()
|
||||
|
||||
if (warn_about_drivers)
|
||||
{
|
||||
hid_log.error("One or more pads were detected but couldn't be interacted with directly");
|
||||
hid_log.error("One or more %s pads were detected but couldn't be interacted with directly", m_type);
|
||||
#if defined(_WIN32) || defined(__linux__)
|
||||
hid_log.error("Check https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration for intructions on how to solve this issue");
|
||||
#endif
|
||||
@ -164,11 +164,11 @@ void hid_pad_handler<Device>::enumerate_devices()
|
||||
const size_t count = std::count_if(m_controllers.cbegin(), m_controllers.cend(), [](const auto& c) { return c.second && c.second->hidDevice; });
|
||||
if (count > 0)
|
||||
{
|
||||
hid_log.success("Controllers found: %d", count);
|
||||
hid_log.success("%s Controllers found: %d", m_type, count);
|
||||
}
|
||||
else
|
||||
{
|
||||
hid_log.warning("No controllers found!");
|
||||
hid_log.warning("No %s controllers found!", m_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user