|
|
|
@ -82,7 +82,10 @@ struct InputSubsystem::Impl { |
|
|
|
#ifdef ENABLE_LIBUSB
|
|
|
|
RegisterEngine("gcpad", gcadapter); |
|
|
|
#endif
|
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
// TODO: Issue in PS4, crash for UDP_client
|
|
|
|
RegisterEngine("cemuhookudp", udp_client); |
|
|
|
#endif
|
|
|
|
RegisterEngine("tas", tas_input); |
|
|
|
RegisterEngine("camera", camera); |
|
|
|
#ifdef ANDROID
|
|
|
|
@ -116,7 +119,9 @@ struct InputSubsystem::Impl { |
|
|
|
#ifdef ENABLE_LIBUSB
|
|
|
|
UnregisterEngine(gcadapter); |
|
|
|
#endif
|
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
UnregisterEngine(udp_client); |
|
|
|
#endif
|
|
|
|
UnregisterEngine(tas_input); |
|
|
|
UnregisterEngine(camera); |
|
|
|
#ifdef ANDROID
|
|
|
|
@ -152,8 +157,10 @@ struct InputSubsystem::Impl { |
|
|
|
auto gcadapter_devices = gcadapter->GetInputDevices(); |
|
|
|
devices.insert(devices.end(), gcadapter_devices.begin(), gcadapter_devices.end()); |
|
|
|
#endif
|
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
auto udp_devices = udp_client->GetInputDevices(); |
|
|
|
devices.insert(devices.end(), udp_devices.begin(), udp_devices.end()); |
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SDL2
|
|
|
|
auto joycon_devices = joycon->GetInputDevices(); |
|
|
|
devices.insert(devices.end(), joycon_devices.begin(), joycon_devices.end()); |
|
|
|
@ -186,9 +193,11 @@ struct InputSubsystem::Impl { |
|
|
|
return gcadapter; |
|
|
|
} |
|
|
|
#endif
|
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
if (engine == udp_client->GetEngineName()) { |
|
|
|
return udp_client; |
|
|
|
} |
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SDL2
|
|
|
|
if (engine == sdl->GetEngineName()) { |
|
|
|
return sdl; |
|
|
|
@ -271,9 +280,11 @@ struct InputSubsystem::Impl { |
|
|
|
return true; |
|
|
|
} |
|
|
|
#endif
|
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
if (engine == udp_client->GetEngineName()) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
#endif
|
|
|
|
if (engine == tas_input->GetEngineName()) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
@ -300,7 +311,9 @@ struct InputSubsystem::Impl { |
|
|
|
#ifdef ENABLE_LIBUSB
|
|
|
|
gcadapter->BeginConfiguration(); |
|
|
|
#endif
|
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
udp_client->BeginConfiguration(); |
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SDL2
|
|
|
|
sdl->BeginConfiguration(); |
|
|
|
joycon->BeginConfiguration(); |
|
|
|
@ -316,7 +329,9 @@ struct InputSubsystem::Impl { |
|
|
|
#ifdef ENABLE_LIBUSB
|
|
|
|
gcadapter->EndConfiguration(); |
|
|
|
#endif
|
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
udp_client->EndConfiguration(); |
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SDL2
|
|
|
|
sdl->EndConfiguration(); |
|
|
|
joycon->EndConfiguration(); |
|
|
|
@ -341,7 +356,9 @@ struct InputSubsystem::Impl { |
|
|
|
std::shared_ptr<Mouse> mouse; |
|
|
|
std::shared_ptr<TouchScreen> touch_screen; |
|
|
|
std::shared_ptr<TasInput::Tas> tas_input; |
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
std::shared_ptr<CemuhookUDP::UDPClient> udp_client; |
|
|
|
#endif
|
|
|
|
std::shared_ptr<Camera> camera; |
|
|
|
std::shared_ptr<VirtualAmiibo> virtual_amiibo; |
|
|
|
std::shared_ptr<VirtualGamepad> virtual_gamepad; |
|
|
|
@ -470,7 +487,9 @@ bool InputSubsystem::IsStickInverted(const Common::ParamPackage& params) const { |
|
|
|
} |
|
|
|
|
|
|
|
void InputSubsystem::ReloadInputDevices() { |
|
|
|
#ifndef __OPENORBIS__
|
|
|
|
impl->udp_client.get()->ReloadSockets(); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
void InputSubsystem::BeginMapping(Polling::InputType type) { |
|
|
|
|