From 06a5ef5874144a70e30e577a83ba68d1dad79e78 Mon Sep 17 00:00:00 2001 From: german77 Date: Mon, 11 Oct 2021 00:43:11 -0500 Subject: core/hid: Add output devices --- src/input_common/main.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'src/input_common/main.cpp') 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("gcpad"); gcadapter->SetMappingCallback(mapping_callback); - gcadapter_factory = std::make_shared(gcadapter); - Input::RegisterFactory(gcadapter->GetEngineName(), gcadapter_factory); + gcadapter_input_factory = std::make_shared(gcadapter); + gcadapter_output_factory = std::make_shared(gcadapter); + Input::RegisterFactory(gcadapter->GetEngineName(), gcadapter_input_factory); + Input::RegisterFactory(gcadapter->GetEngineName(), gcadapter_output_factory); udp_client = std::make_shared("cemuhookudp"); udp_client->SetMappingCallback(mapping_callback); @@ -62,8 +64,10 @@ struct InputSubsystem::Impl { #ifdef HAVE_SDL2 sdl = std::make_shared("sdl"); sdl->SetMappingCallback(mapping_callback); - sdl_factory = std::make_shared(sdl); - Input::RegisterFactory(sdl->GetEngineName(), sdl_factory); + sdl_input_factory = std::make_shared(sdl); + sdl_output_factory = std::make_shared(sdl); + Input::RegisterFactory(sdl->GetEngineName(), sdl_input_factory); + Input::RegisterFactory(sdl->GetEngineName(), sdl_output_factory); #endif Input::RegisterFactory("touch_from_button", @@ -247,21 +251,27 @@ struct InputSubsystem::Impl { } std::shared_ptr mapping_factory; + std::shared_ptr keyboard; - std::shared_ptr keyboard_factory; std::shared_ptr mouse; - std::shared_ptr mouse_factory; std::shared_ptr gcadapter; - std::shared_ptr gcadapter_factory; std::shared_ptr touch_screen; - std::shared_ptr touch_screen_factory; + std::shared_ptr tas_input; std::shared_ptr udp_client; + + std::shared_ptr keyboard_factory; + std::shared_ptr mouse_factory; + std::shared_ptr gcadapter_input_factory; + std::shared_ptr touch_screen_factory; std::shared_ptr udp_client_factory; - std::shared_ptr tas_input; std::shared_ptr tas_input_factory; + + std::shared_ptr gcadapter_output_factory; + #ifdef HAVE_SDL2 std::shared_ptr sdl; - std::shared_ptr sdl_factory; + std::shared_ptr sdl_input_factory; + std::shared_ptr sdl_output_factory; #endif }; -- cgit v1.2.3