Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix one warning #7752

Merged
merged 2 commits into from Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion Utilities/Thread.cpp
Expand Up @@ -1749,8 +1749,14 @@ static void signal_handler(int sig, siginfo_t* info, void* uct) noexcept

fmt::append(msg, "Thread id = %s.\n", std::this_thread::get_id());

// TODO (debugger interaction)
sys_log.fatal("\n%s", msg);
std::fprintf(stderr, "%s\n", msg.c_str());

if (IsDebuggerPresent())
{
__asm("int3;");
}

report_fatal_error(msg);
}

Expand Down
9 changes: 5 additions & 4 deletions rpcs3/Input/ds4_pad_handler.cpp
Expand Up @@ -535,8 +535,9 @@ void ds4_pad_handler::CheckAddDevice(hid_device* hidDevice, hid_device_info* hid
else
{
ds4Dev->btCon = true;
std::wstring wSerial(hidDevInfo->serial_number);
serial = std::string(wSerial.begin(), wSerial.end());
std::wstring_view wideSerial(hidDevInfo->serial_number);
for (wchar_t ch : wideSerial)
serial += static_cast<uchar>(ch);
}

if (!GetCalibrationData(ds4Dev))
Expand Down Expand Up @@ -951,10 +952,10 @@ void ds4_pad_handler::apply_pad_data(const std::shared_ptr<PadDevice>& device, c
}

// Use LEDs to indicate battery level
if (ds4_dev->config->led_battery_indicator)
if (ds4_dev->config->led_battery_indicator)
{
// This makes sure that the LED color doesn't update every 1ms. DS4 only reports battery level in 10% increments
if (ds4_dev->last_battery_level != ds4_dev->batteryLevel)
if (ds4_dev->last_battery_level != ds4_dev->batteryLevel)
{
const u32 combined_color = get_battery_color(ds4_dev->batteryLevel, ds4_dev->config->led_battery_indicator_brightness);
ds4_dev->config->colorR.set(combined_color >> 8);
Expand Down