InputCommon: Rename SDL input backend GameController to Gamepad.

This commit is contained in:
Jordan Woyak
2025-06-25 00:16:27 -05:00
parent 43aa7e9b96
commit 609d91156a
3 changed files with 76 additions and 77 deletions

View File

@ -251,9 +251,9 @@ void InputBackend::OpenAndAddDevice(SDL_JoystickID instance_id)
// SDL tries parsing these as Joysticks
return;
}
auto gamecontroller = std::make_shared<GameController>(gc, js);
if (!gamecontroller->Inputs().empty() || !gamecontroller->Outputs().empty())
GetControllerInterface().AddDevice(std::move(gamecontroller));
auto gamepad = std::make_shared<Gamepad>(gc, js);
if (!gamepad->Inputs().empty() || !gamepad->Outputs().empty())
GetControllerInterface().AddDevice(std::move(gamepad));
}
}
@ -267,7 +267,7 @@ bool InputBackend::HandleEventAndContinue(const SDL_Event& e)
{
GetControllerInterface().RemoveDevice([&e](const auto* device) {
return device->GetSource() == "SDL" &&
static_cast<const GameController*>(device)->GetSDLInstanceID() == e.jdevice.which;
static_cast<const Gamepad*>(device)->GetSDLInstanceID() == e.jdevice.which;
});
}
else if (e.type == m_populate_event_type)