diff options
author | german77 <juangerman-13@hotmail.com> | 2021-10-11 07:43:11 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:24 +0100 |
commit | 06a5ef5874144a70e30e577a83ba68d1dad79e78 (patch) | |
tree | 867fa1153c7285c858cdb5bd7f60f08266532a88 /src/input_common/main.cpp | |
parent | core: Update input interpreter (diff) | |
download | yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.gz yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.bz2 yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.lz yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.xz yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.zst yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.zip |
Diffstat (limited to 'src/input_common/main.cpp')
-rw-r--r-- | src/input_common/main.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index 46ca6b76c..b7fe9cb37 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp @@ -46,8 +46,10 @@ struct InputSubsystem::Impl { gcadapter = std::make_shared<GCAdapter>("gcpad"); gcadapter->SetMappingCallback(mapping_callback); - gcadapter_factory = std::make_shared<InputFactory>(gcadapter); - Input::RegisterFactory<Input::InputDevice>(gcadapter->GetEngineName(), gcadapter_factory); + gcadapter_input_factory = std::make_shared<InputFactory>(gcadapter); + gcadapter_output_factory = std::make_shared<OutputFactory>(gcadapter); + Input::RegisterFactory<Input::InputDevice>(gcadapter->GetEngineName(), gcadapter_input_factory); + Input::RegisterFactory<Input::OutputDevice>(gcadapter->GetEngineName(), gcadapter_output_factory); udp_client = std::make_shared<CemuhookUDP::UDPClient>("cemuhookudp"); udp_client->SetMappingCallback(mapping_callback); @@ -62,8 +64,10 @@ struct InputSubsystem::Impl { #ifdef HAVE_SDL2 sdl = std::make_shared<SDLDriver>("sdl"); sdl->SetMappingCallback(mapping_callback); - sdl_factory = std::make_shared<InputFactory>(sdl); - Input::RegisterFactory<Input::InputDevice>(sdl->GetEngineName(), sdl_factory); + sdl_input_factory = std::make_shared<InputFactory>(sdl); + sdl_output_factory = std::make_shared<OutputFactory>(sdl); + Input::RegisterFactory<Input::InputDevice>(sdl->GetEngineName(), sdl_input_factory); + Input::RegisterFactory<Input::OutputDevice>(sdl->GetEngineName(), sdl_output_factory); #endif Input::RegisterFactory<Input::InputDevice>("touch_from_button", @@ -247,21 +251,27 @@ struct InputSubsystem::Impl { } std::shared_ptr<MappingFactory> mapping_factory; + std::shared_ptr<Keyboard> keyboard; - std::shared_ptr<InputFactory> keyboard_factory; std::shared_ptr<Mouse> mouse; - std::shared_ptr<InputFactory> mouse_factory; std::shared_ptr<GCAdapter> gcadapter; - std::shared_ptr<InputFactory> gcadapter_factory; std::shared_ptr<TouchScreen> touch_screen; - std::shared_ptr<InputFactory> touch_screen_factory; + std::shared_ptr<TasInput::Tas> tas_input; std::shared_ptr<CemuhookUDP::UDPClient> udp_client; + + std::shared_ptr<InputFactory> keyboard_factory; + std::shared_ptr<InputFactory> mouse_factory; + std::shared_ptr<InputFactory> gcadapter_input_factory; + std::shared_ptr<InputFactory> touch_screen_factory; std::shared_ptr<InputFactory> udp_client_factory; - std::shared_ptr<TasInput::Tas> tas_input; std::shared_ptr<InputFactory> tas_input_factory; + + std::shared_ptr<OutputFactory> gcadapter_output_factory; + #ifdef HAVE_SDL2 std::shared_ptr<SDLDriver> sdl; - std::shared_ptr<InputFactory> sdl_factory; + std::shared_ptr<InputFactory> sdl_input_factory; + std::shared_ptr<OutputFactory> sdl_output_factory; #endif }; |