mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 05:16:24 -05:00
settings: Fix controller preview not displaying the correct controller
This commit is contained in:
parent
5d0f3540c4
commit
d14e74132c
3 changed files with 7 additions and 4 deletions
|
@ -880,7 +880,7 @@ void EmulatedController::Disconnect() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EmulatedController::IsConnected(bool get_temporary_value) const {
|
bool EmulatedController::IsConnected(bool get_temporary_value) const {
|
||||||
if (get_temporary_value) {
|
if (get_temporary_value && is_configuring) {
|
||||||
return tmp_is_connected;
|
return tmp_is_connected;
|
||||||
}
|
}
|
||||||
return is_connected;
|
return is_connected;
|
||||||
|
@ -897,7 +897,7 @@ NpadIdType EmulatedController::GetNpadIdType() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
NpadStyleIndex EmulatedController::GetNpadStyleIndex(bool get_temporary_value) const {
|
NpadStyleIndex EmulatedController::GetNpadStyleIndex(bool get_temporary_value) const {
|
||||||
if (get_temporary_value) {
|
if (get_temporary_value && is_configuring) {
|
||||||
return tmp_npad_type;
|
return tmp_npad_type;
|
||||||
}
|
}
|
||||||
return npad_type;
|
return npad_type;
|
||||||
|
|
|
@ -2394,7 +2394,7 @@ void PlayerControlPreview::DrawGCJoystick(QPainter& p, const QPointF center,
|
||||||
|
|
||||||
void PlayerControlPreview::DrawRawJoystick(QPainter& p, QPointF center_left, QPointF center_right) {
|
void PlayerControlPreview::DrawRawJoystick(QPainter& p, QPointF center_left, QPointF center_right) {
|
||||||
using namespace Settings::NativeAnalog;
|
using namespace Settings::NativeAnalog;
|
||||||
if (controller_type != Core::HID::NpadStyleIndex::JoyconLeft) {
|
if (center_right != QPointF(0, 0)) {
|
||||||
DrawJoystickProperties(p, center_right, stick_values[RStick].x.properties);
|
DrawJoystickProperties(p, center_right, stick_values[RStick].x.properties);
|
||||||
p.setPen(colors.indicator);
|
p.setPen(colors.indicator);
|
||||||
p.setBrush(colors.indicator);
|
p.setBrush(colors.indicator);
|
||||||
|
@ -2404,7 +2404,7 @@ void PlayerControlPreview::DrawRawJoystick(QPainter& p, QPointF center_left, QPo
|
||||||
DrawJoystickDot(p, center_right, stick_values[RStick], false);
|
DrawJoystickDot(p, center_right, stick_values[RStick], false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controller_type != Core::HID::NpadStyleIndex::JoyconRight) {
|
if (center_left != QPointF(0, 0)) {
|
||||||
DrawJoystickProperties(p, center_left, stick_values[LStick].x.properties);
|
DrawJoystickProperties(p, center_left, stick_values[LStick].x.properties);
|
||||||
p.setPen(colors.indicator);
|
p.setPen(colors.indicator);
|
||||||
p.setBrush(colors.indicator);
|
p.setBrush(colors.indicator);
|
||||||
|
|
|
@ -230,6 +230,7 @@ GMainWindow::GMainWindow()
|
||||||
ConnectWidgetEvents();
|
ConnectWidgetEvents();
|
||||||
|
|
||||||
system->HIDCore().ReloadInputDevices();
|
system->HIDCore().ReloadInputDevices();
|
||||||
|
controller_dialog->refreshConfiguration();
|
||||||
|
|
||||||
const auto branch_name = std::string(Common::g_scm_branch);
|
const auto branch_name = std::string(Common::g_scm_branch);
|
||||||
const auto description = std::string(Common::g_scm_desc);
|
const auto description = std::string(Common::g_scm_desc);
|
||||||
|
@ -843,6 +844,7 @@ void GMainWindow::InitializeWidgets() {
|
||||||
handheld->Disconnect();
|
handheld->Disconnect();
|
||||||
player_1->SetNpadStyleIndex(Core::HID::NpadStyleIndex::ProController);
|
player_1->SetNpadStyleIndex(Core::HID::NpadStyleIndex::ProController);
|
||||||
player_1->Connect();
|
player_1->Connect();
|
||||||
|
controller_dialog->refreshConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::values.use_docked_mode.SetValue(!is_docked);
|
Settings::values.use_docked_mode.SetValue(!is_docked);
|
||||||
|
@ -2744,6 +2746,7 @@ void GMainWindow::OnConfigure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateStatusButtons();
|
UpdateStatusButtons();
|
||||||
|
controller_dialog->refreshConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnConfigureTas() {
|
void GMainWindow::OnConfigureTas() {
|
||||||
|
|
Loading…
Reference in a new issue