From a403e379012fd0f28357c969640f6af9b2657652 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Wed, 28 Sep 2016 13:32:13 -0400 Subject: [PATCH] always build an implementation of GCAdapter (either libusb or android) --- Source/Core/InputCommon/CMakeLists.txt | 11 ++--- Source/Core/InputCommon/GCAdapter_Null.cpp | 53 ---------------------- 2 files changed, 5 insertions(+), 59 deletions(-) delete mode 100644 Source/Core/InputCommon/GCAdapter_Null.cpp diff --git a/Source/Core/InputCommon/CMakeLists.txt b/Source/Core/InputCommon/CMakeLists.txt index a0bcef815d..0c6b95a771 100644 --- a/Source/Core/InputCommon/CMakeLists.txt +++ b/Source/Core/InputCommon/CMakeLists.txt @@ -32,13 +32,12 @@ elseif(ANDROID) ControllerInterface/Android/Android.cpp) endif() -if(LIBUSB_FOUND) - set(SRCS ${SRCS} GCAdapter.cpp) -elseif(ANDROID) - set(SRCS ${SRCS} GCAdapter_Android.cpp) +if(ANDROID) + set(SRCS ${SRCS} GCAdapter_Android.cpp) else() - set(SRCS ${SRCS} GCAdapter_Null.cpp) -endif(LIBUSB_FOUND) + set(SRCS ${SRCS} GCAdapter.cpp) + set(LIBS ${LIBS} ${LIBUSB_LIBRARIES}) +endif() if(LIBEVDEV_FOUND AND LIBUDEV_FOUND) set(SRCS ${SRCS} ControllerInterface/evdev/evdev.cpp) diff --git a/Source/Core/InputCommon/GCAdapter_Null.cpp b/Source/Core/InputCommon/GCAdapter_Null.cpp deleted file mode 100644 index e5b30a312f..0000000000 --- a/Source/Core/InputCommon/GCAdapter_Null.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2014 Dolphin Emulator Project -// Licensed under GPLv2+ -// Refer to the license.txt file included. - -#include "InputCommon/GCAdapter.h" -#include "Common/CommonTypes.h" -#include "InputCommon/GCPadStatus.h" - -namespace GCAdapter -{ -void Init() -{ -} -void ResetRumble() -{ -} -void Shutdown() -{ -} -void SetAdapterCallback(std::function func) -{ -} -void StartScanThread() -{ -} -void StopScanThread() -{ -} -GCPadStatus Input(int chan) -{ - return {}; -} -void Output(int chan, u8 rumble_command) -{ -} -bool IsDetected() -{ - return false; -} -bool IsDriverDetected() -{ - return false; -} -bool DeviceConnected(int chan) -{ - return false; -} -bool UseAdapter() -{ - return false; -} - -} // end of namespace GCAdapter