summaryrefslogtreecommitdiffstats
path: root/src/input_common/main.cpp
diff options
context:
space:
mode:
authorAmeer <aj662@drexel.edu>2020-06-22 03:50:58 +0200
committerAmeer <aj662@drexel.edu>2020-06-22 03:50:58 +0200
commit46b4461fbb0514dd50c096ef896b1752d81079d0 (patch)
tree31245dd4ff76724295a20202cea9dba72635f3a0 /src/input_common/main.cpp
parentstd::arrays where appropriate, clear q in adapter class, other touch ups (diff)
downloadyuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar
yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar.gz
yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar.bz2
yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar.lz
yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar.xz
yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.tar.zst
yuzu-46b4461fbb0514dd50c096ef896b1752d81079d0.zip
Diffstat (limited to 'src/input_common/main.cpp')
-rw-r--r--src/input_common/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp
index 89dddf7cf..fc399db7e 100644
--- a/src/input_common/main.cpp
+++ b/src/input_common/main.cpp
@@ -25,13 +25,15 @@ static std::shared_ptr<MotionEmu> motion_emu;
static std::unique_ptr<SDL::State> sdl;
#endif
static std::unique_ptr<CemuhookUDP::State> udp;
+static std::shared_ptr<GCAdapter::Adapter> gcadapter;
static std::shared_ptr<GCButtonFactory> gcbuttons;
static std::shared_ptr<GCAnalogFactory> gcanalog;
void Init() {
- gcbuttons = std::make_shared<GCButtonFactory>();
+ gcadapter = std::make_shared<GCAdapter::Adapter>();
+ gcbuttons = std::make_shared<GCButtonFactory>(gcadapter);
Input::RegisterFactory<Input::ButtonDevice>("gcpad", gcbuttons);
- gcanalog = std::make_shared<GCAnalogFactory>();
+ gcanalog = std::make_shared<GCAnalogFactory>(gcadapter);
Input::RegisterFactory<Input::AnalogDevice>("gcpad", gcanalog);
keyboard = std::make_shared<Keyboard>();