summaryrefslogtreecommitdiffstats
path: root/src/yuzu
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-11-09 03:28:09 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:28 +0100
commit71f9b90dd90c442425900ee16af8b4e39ac54aed (patch)
treeffd9c7d6fdd3ab7d9e2ef0f439968906b36c8d53 /src/yuzu
parentsettings: Remove includes of core.h (diff)
downloadyuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar.gz
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar.bz2
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar.lz
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar.xz
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.tar.zst
yuzu-71f9b90dd90c442425900ee16af8b4e39ac54aed.zip
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp4
-rw-r--r--src/yuzu/configuration/configure_input_player_widget.cpp24
2 files changed, 19 insertions, 9 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 76f55eb54..0254ea6fe 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -627,7 +627,8 @@ void ConfigureInputPlayer::UpdateInputDeviceCombobox() {
return;
}
- const auto devices = emulated_controller->GetMappedDevices(Core::HID::DeviceIndex::AllDevices);
+ const auto devices =
+ emulated_controller->GetMappedDevices(Core::HID::EmulatedDeviceIndex::AllDevices);
UpdateInputDevices();
if (devices.empty()) {
@@ -846,6 +847,7 @@ void ConfigureInputPlayer::SetConnectableControllers() {
if (!is_powered_on) {
add_controllers(true);
+ return;
}
add_controllers(false, hid_core.GetSupportedStyleTag());
diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp
index ff40f57f5..6630321cb 100644
--- a/src/yuzu/configuration/configure_input_player_widget.cpp
+++ b/src/yuzu/configuration/configure_input_player_widget.cpp
@@ -357,7 +357,8 @@ void PlayerControlPreview::DrawLeftController(QPainter& p, const QPointF center)
DrawCircle(p, center + QPoint(26, 71), 5);
// Draw battery
- DrawBattery(p, center + QPoint(-170, -140), battery_values[Core::HID::DeviceIndex::LeftIndex]);
+ DrawBattery(p, center + QPoint(-170, -140),
+ battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
}
void PlayerControlPreview::DrawRightController(QPainter& p, const QPointF center) {
@@ -483,7 +484,8 @@ void PlayerControlPreview::DrawRightController(QPainter& p, const QPointF center
DrawSymbol(p, center + QPoint(-26, 66), Symbol::House, 5);
// Draw battery
- DrawBattery(p, center + QPoint(110, -140), battery_values[Core::HID::DeviceIndex::RightIndex]);
+ DrawBattery(p, center + QPoint(110, -140),
+ battery_values[Core::HID::EmulatedDeviceIndex::RightIndex]);
}
void PlayerControlPreview::DrawDualController(QPainter& p, const QPointF center) {
@@ -619,8 +621,10 @@ void PlayerControlPreview::DrawDualController(QPainter& p, const QPointF center)
DrawSymbol(p, center + QPoint(50, 60), Symbol::House, 4.2f);
// Draw battery
- DrawBattery(p, center + QPoint(-100, -160), battery_values[Core::HID::DeviceIndex::LeftIndex]);
- DrawBattery(p, center + QPoint(40, -160), battery_values[Core::HID::DeviceIndex::RightIndex]);
+ DrawBattery(p, center + QPoint(-100, -160),
+ battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
+ DrawBattery(p, center + QPoint(40, -160),
+ battery_values[Core::HID::EmulatedDeviceIndex::RightIndex]);
}
void PlayerControlPreview::DrawHandheldController(QPainter& p, const QPointF center) {
@@ -721,8 +725,10 @@ void PlayerControlPreview::DrawHandheldController(QPainter& p, const QPointF cen
DrawSymbol(p, center + QPoint(161, 37), Symbol::House, 2.75f);
// Draw battery
- DrawBattery(p, center + QPoint(-200, 110), battery_values[Core::HID::DeviceIndex::LeftIndex]);
- DrawBattery(p, center + QPoint(130, 110), battery_values[Core::HID::DeviceIndex::RightIndex]);
+ DrawBattery(p, center + QPoint(-200, 110),
+ battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
+ DrawBattery(p, center + QPoint(130, 110),
+ battery_values[Core::HID::EmulatedDeviceIndex::RightIndex]);
}
void PlayerControlPreview::DrawProController(QPainter& p, const QPointF center) {
@@ -812,7 +818,8 @@ void PlayerControlPreview::DrawProController(QPainter& p, const QPointF center)
DrawSymbol(p, center + QPoint(29, -56), Symbol::House, 3.9f);
// Draw battery
- DrawBattery(p, center + QPoint(-30, -160), battery_values[Core::HID::DeviceIndex::LeftIndex]);
+ DrawBattery(p, center + QPoint(-30, -160),
+ battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
}
void PlayerControlPreview::DrawGCController(QPainter& p, const QPointF center) {
@@ -868,7 +875,8 @@ void PlayerControlPreview::DrawGCController(QPainter& p, const QPointF center) {
DrawCircleButton(p, center + QPoint(0, -44), button_values[Plus], 8);
// Draw battery
- DrawBattery(p, center + QPoint(-30, -165), battery_values[Core::HID::DeviceIndex::LeftIndex]);
+ DrawBattery(p, center + QPoint(-30, -165),
+ battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
}
constexpr std::array<float, 13 * 2> symbol_a = {