Input: UDP Client to provide motion and touch controls
An implementation of the cemuhook motion/touch protocol, this adds the ability for users to connect several different devices to citra to send direct motion and touch data to citra.
This commit is contained in:
parent
1e724b046b
commit
6bcbda5ab2
16 changed files with 758 additions and 14 deletions
|
@ -414,18 +414,16 @@ private:
|
|||
SDL_JoystickID analog_axes_joystick = -1;
|
||||
};
|
||||
|
||||
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> GetPollers(
|
||||
InputCommon::Polling::DeviceType type) {
|
||||
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> pollers;
|
||||
void GetPollers(InputCommon::Polling::DeviceType type,
|
||||
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>>& pollers) {
|
||||
switch (type) {
|
||||
case InputCommon::Polling::DeviceType::Analog:
|
||||
pollers.push_back(std::make_unique<SDLAnalogPoller>());
|
||||
pollers.emplace_back(std::make_unique<SDLAnalogPoller>());
|
||||
break;
|
||||
case InputCommon::Polling::DeviceType::Button:
|
||||
pollers.push_back(std::make_unique<SDLButtonPoller>());
|
||||
pollers.emplace_back(std::make_unique<SDLButtonPoller>());
|
||||
break;
|
||||
}
|
||||
return pollers;
|
||||
}
|
||||
} // namespace Polling
|
||||
} // namespace SDL
|
||||
|
|
|
@ -34,8 +34,8 @@ Common::ParamPackage SDLEventToButtonParamPackage(const SDL_Event& event);
|
|||
namespace Polling {
|
||||
|
||||
/// Get all DevicePoller that use the SDL backend for a specific device type
|
||||
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> GetPollers(
|
||||
InputCommon::Polling::DeviceType type);
|
||||
void GetPollers(InputCommon::Polling::DeviceType type,
|
||||
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>>& pollers);
|
||||
|
||||
} // namespace Polling
|
||||
} // namespace SDL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue