Skip to content

Commit

Permalink
Merge pull request #299 from bslenul/controller-always-connected
Browse files Browse the repository at this point in the history
Keep controller connected
  • Loading branch information
LibretroAdmin authored Dec 17, 2022
2 parents 0df1b5b + 7a33aeb commit 2f4b0f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Core/DolphinLibretro/Input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,9 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
ControllerEmu::ControlGroup* gcDPad = gcPad->GetGroup(PadGroup::DPad);
ControllerEmu::ControlGroup* gcTriggers = gcPad->GetGroup(PadGroup::Triggers);
ControllerEmu::ControlGroup* gcRumble = gcPad->GetGroup(PadGroup::Rumble);
ControllerEmu::ControlGroup* gcOptions = gcPad->GetGroup(PadGroup::Options);
#if 0
ControllerEmu::ControlGroup* gcMic = gcPad->GetGroup(PadGroup::Mic);
ControllerEmu::ControlGroup* gcOptions = gcPad->GetGroup(PadGroup::Options);
#endif
gcButtons->SetControlExpression(0, "A"); // A
gcButtons->SetControlExpression(1, "B"); // B
Expand Down Expand Up @@ -639,6 +639,8 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
"`" + devAnalog + ":Trigger1+`|R3"); // R-trigger Soft Press
if (Libretro::Options::enableRumble)
gcRumble->SetControlExpression(0, "Rumble");
static_cast<ControllerEmu::NumericSetting<bool>*>(gcOptions->numeric_settings[0].get())
->SetValue(true); // Always Connected

gcPad->UpdateReferences(g_controller_interface);
Pad::GetConfig()->SaveConfig();
Expand Down

0 comments on commit 2f4b0f7

Please sign in to comment.