Move SI_GCAdapter over to InputCommon
This commit is contained in:
parent
0da8bd0f61
commit
371e9f4fae
|
@ -239,8 +239,7 @@ set(LIBS
|
||||||
if(LIBUSB_FOUND)
|
if(LIBUSB_FOUND)
|
||||||
# Using shared LibUSB
|
# Using shared LibUSB
|
||||||
set(LIBS ${LIBS} ${LIBUSB_LIBRARIES})
|
set(LIBS ${LIBS} ${LIBUSB_LIBRARIES})
|
||||||
set(SRCS ${SRCS} IPC_HLE/WII_IPC_HLE_Device_hid.cpp
|
set(SRCS ${SRCS} IPC_HLE/WII_IPC_HLE_Device_hid.cpp)
|
||||||
HW/SI_GCAdapter.cpp)
|
|
||||||
endif(LIBUSB_FOUND)
|
endif(LIBUSB_FOUND)
|
||||||
|
|
||||||
set(LIBS ${LIBS} ${MBEDTLS_LIBRARIES})
|
set(LIBS ${LIBS} ${MBEDTLS_LIBRARIES})
|
||||||
|
|
|
@ -48,9 +48,6 @@
|
||||||
#include "Core/HW/HW.h"
|
#include "Core/HW/HW.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
#include "Core/HW/ProcessorInterface.h"
|
#include "Core/HW/ProcessorInterface.h"
|
||||||
#if defined(__LIBUSB__) || defined(_WIN32)
|
|
||||||
#include "Core/HW/SI_GCAdapter.h"
|
|
||||||
#endif
|
|
||||||
#include "Core/HW/SystemTimers.h"
|
#include "Core/HW/SystemTimers.h"
|
||||||
#include "Core/HW/VideoInterface.h"
|
#include "Core/HW/VideoInterface.h"
|
||||||
#include "Core/HW/Wiimote.h"
|
#include "Core/HW/Wiimote.h"
|
||||||
|
@ -65,6 +62,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "DiscIO/FileMonitor.h"
|
#include "DiscIO/FileMonitor.h"
|
||||||
|
#include "InputCommon/GCAdapter.h"
|
||||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
#include "VideoCommon/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/VideoBackendBase.h"
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
|
@ -285,7 +283,7 @@ void Stop() // - Hammertime!
|
||||||
g_video_backend->Video_ExitLoop();
|
g_video_backend->Video_ExitLoop();
|
||||||
}
|
}
|
||||||
#if defined(__LIBUSB__) || defined(_WIN32)
|
#if defined(__LIBUSB__) || defined(_WIN32)
|
||||||
SI_GCAdapter::ResetRumble();
|
GCAdapter::ResetRumble();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_MEMORYWATCHER
|
#ifdef USE_MEMORYWATCHER
|
||||||
|
@ -630,7 +628,7 @@ void SetState(EState _State)
|
||||||
CPU::EnableStepping(true); // Break
|
CPU::EnableStepping(true); // Break
|
||||||
Wiimote::Pause();
|
Wiimote::Pause();
|
||||||
#if defined(__LIBUSB__) || defined(_WIN32)
|
#if defined(__LIBUSB__) || defined(_WIN32)
|
||||||
SI_GCAdapter::ResetRumble();
|
GCAdapter::ResetRumble();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case CORE_RUN:
|
case CORE_RUN:
|
||||||
|
@ -741,7 +739,7 @@ bool PauseAndLock(bool doLock, bool unpauseOnUnlock)
|
||||||
g_video_backend->PauseAndLock(doLock, unpauseOnUnlock);
|
g_video_backend->PauseAndLock(doLock, unpauseOnUnlock);
|
||||||
|
|
||||||
#if defined(__LIBUSB__) || defined(_WIN32)
|
#if defined(__LIBUSB__) || defined(_WIN32)
|
||||||
SI_GCAdapter::ResetRumble();
|
GCAdapter::ResetRumble();
|
||||||
#endif
|
#endif
|
||||||
return wasUnpaused;
|
return wasUnpaused;
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,13 +148,6 @@
|
||||||
<ClCompile Include="HW\SI_DeviceGCController.cpp" />
|
<ClCompile Include="HW\SI_DeviceGCController.cpp" />
|
||||||
<ClCompile Include="HW\SI_DeviceGCSteeringWheel.cpp" />
|
<ClCompile Include="HW\SI_DeviceGCSteeringWheel.cpp" />
|
||||||
<ClCompile Include="HW\SI_DeviceKeyboard.cpp" />
|
<ClCompile Include="HW\SI_DeviceKeyboard.cpp" />
|
||||||
<ClCompile Include="HW\SI_GCAdapter.cpp">
|
|
||||||
<!--
|
|
||||||
Disable "nonstandard extension used : zero-sized array in struct/union" warning,
|
|
||||||
which is hit in libusb.h.
|
|
||||||
-->
|
|
||||||
<DisableSpecificWarnings>4200;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="HW\Sram.cpp" />
|
<ClCompile Include="HW\Sram.cpp" />
|
||||||
<ClCompile Include="HW\StreamADPCM.cpp" />
|
<ClCompile Include="HW\StreamADPCM.cpp" />
|
||||||
<ClCompile Include="HW\SystemTimers.cpp" />
|
<ClCompile Include="HW\SystemTimers.cpp" />
|
||||||
|
@ -360,7 +353,6 @@
|
||||||
<ClInclude Include="HW\SI_DeviceGCController.h" />
|
<ClInclude Include="HW\SI_DeviceGCController.h" />
|
||||||
<ClInclude Include="HW\SI_DeviceGCSteeringWheel.h" />
|
<ClInclude Include="HW\SI_DeviceGCSteeringWheel.h" />
|
||||||
<ClInclude Include="HW\SI_DeviceKeyboard.h" />
|
<ClInclude Include="HW\SI_DeviceKeyboard.h" />
|
||||||
<ClInclude Include="HW\SI_GCAdapter.h" />
|
|
||||||
<ClInclude Include="HW\Sram.h" />
|
<ClInclude Include="HW\Sram.h" />
|
||||||
<ClInclude Include="HW\StreamADPCM.h" />
|
<ClInclude Include="HW\StreamADPCM.h" />
|
||||||
<ClInclude Include="HW\SystemTimers.h" />
|
<ClInclude Include="HW\SystemTimers.h" />
|
||||||
|
|
|
@ -720,9 +720,6 @@
|
||||||
<ClCompile Include="PowerPC\MMU.cpp">
|
<ClCompile Include="PowerPC\MMU.cpp">
|
||||||
<Filter>PowerPC</Filter>
|
<Filter>PowerPC</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="HW\SI_GCAdapter.cpp">
|
|
||||||
<Filter>HW %28Flipper/Hollywood%29\SI - Serial Interface</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="PowerPC\JitCommon\JitBackpatch.cpp">
|
<ClCompile Include="PowerPC\JitCommon\JitBackpatch.cpp">
|
||||||
<Filter>PowerPC\JitCommon</Filter>
|
<Filter>PowerPC\JitCommon</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -1241,9 +1238,6 @@
|
||||||
<ClInclude Include="HW\GCKeyboard.h">
|
<ClInclude Include="HW\GCKeyboard.h">
|
||||||
<Filter>HW %28Flipper/Hollywood%29\GCKeyboard</Filter>
|
<Filter>HW %28Flipper/Hollywood%29\GCKeyboard</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="HW\SI_GCAdapter.h">
|
|
||||||
<Filter>HW %28Flipper/Hollywood%29\SI - Serial Interface</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="PowerPC\Jit64Common\Jit64AsmCommon.h">
|
<ClInclude Include="PowerPC\Jit64Common\Jit64AsmCommon.h">
|
||||||
<Filter>PowerPC\Jit64Common</Filter>
|
<Filter>PowerPC\Jit64Common</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
|
@ -26,13 +26,11 @@
|
||||||
#include "Core/HW/GCKeyboard.h"
|
#include "Core/HW/GCKeyboard.h"
|
||||||
#include "Core/HW/GCPad.h"
|
#include "Core/HW/GCPad.h"
|
||||||
#include "Core/HW/SI.h"
|
#include "Core/HW/SI.h"
|
||||||
#if defined(__LIBUSB__) || defined (_WIN32)
|
|
||||||
#include "Core/HW/SI_GCAdapter.h"
|
|
||||||
#endif
|
|
||||||
#include "Core/HW/Wiimote.h"
|
#include "Core/HW/Wiimote.h"
|
||||||
#include "Core/HW/WiimoteReal/WiimoteReal.h"
|
#include "Core/HW/WiimoteReal/WiimoteReal.h"
|
||||||
#include "DolphinWX/ControllerConfigDiag.h"
|
#include "DolphinWX/ControllerConfigDiag.h"
|
||||||
#include "DolphinWX/InputConfigDiag.h"
|
#include "DolphinWX/InputConfigDiag.h"
|
||||||
|
#include "InputCommon/GCAdapter.h"
|
||||||
|
|
||||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||||
#include "DolphinWX/X11Utils.h"
|
#include "DolphinWX/X11Utils.h"
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
#include "Common/SysConf.h"
|
#include "Common/SysConf.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/HW/SI_GCAdapter.h"
|
|
||||||
#include "Core/HW/Wiimote.h"
|
#include "Core/HW/Wiimote.h"
|
||||||
|
#include "InputCommon/GCAdapter.h"
|
||||||
|
|
||||||
class InputConfig;
|
class InputConfig;
|
||||||
class wxButton;
|
class wxButton;
|
||||||
|
|
|
@ -3,8 +3,6 @@ set(SRCS ControllerEmu.cpp
|
||||||
ControllerInterface/ControllerInterface.cpp
|
ControllerInterface/ControllerInterface.cpp
|
||||||
ControllerInterface/Device.cpp
|
ControllerInterface/Device.cpp
|
||||||
ControllerInterface/ExpressionParser.cpp)
|
ControllerInterface/ExpressionParser.cpp)
|
||||||
|
|
||||||
|
|
||||||
set(LIBS common)
|
set(LIBS common)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@ -37,6 +35,10 @@ elseif(ANDROID)
|
||||||
ControllerInterface/Android/Android.cpp)
|
ControllerInterface/Android/Android.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(LIBUSB_FOUND)
|
||||||
|
set(SRCS ${SRCS} GCAdapter.cpp)
|
||||||
|
endif(LIBUSB_FOUND)
|
||||||
|
|
||||||
if(LIBEVDEV_FOUND AND LIBUDEV_FOUND)
|
if(LIBEVDEV_FOUND AND LIBUDEV_FOUND)
|
||||||
set(SRCS ${SRCS} ControllerInterface/evdev/evdev.cpp)
|
set(SRCS ${SRCS} ControllerInterface/evdev/evdev.cpp)
|
||||||
set(LIBS ${LIBS} ${LIBEVDEV_LIBRARY} ${LIBUDEV_LIBRARY})
|
set(LIBS ${LIBS} ${LIBEVDEV_LIBRARY} ${LIBUDEV_LIBRARY})
|
||||||
|
|
|
@ -52,6 +52,13 @@
|
||||||
<ClCompile Include="ControllerInterface\ExpressionParser.cpp" />
|
<ClCompile Include="ControllerInterface\ExpressionParser.cpp" />
|
||||||
<ClCompile Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.cpp" />
|
<ClCompile Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.cpp" />
|
||||||
<ClCompile Include="ControllerInterface\XInput\XInput.cpp" />
|
<ClCompile Include="ControllerInterface\XInput\XInput.cpp" />
|
||||||
|
<ClCompile Include="GCAdapter.cpp">
|
||||||
|
<!--
|
||||||
|
Disable "nonstandard extension used : zero-sized array in struct/union" warning,
|
||||||
|
which is hit in libusb.h.
|
||||||
|
-->
|
||||||
|
<DisableSpecificWarnings>4200;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="InputConfig.cpp" />
|
<ClCompile Include="InputConfig.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -66,6 +73,7 @@
|
||||||
<ClInclude Include="ControllerInterface\ExpressionParser.h" />
|
<ClInclude Include="ControllerInterface\ExpressionParser.h" />
|
||||||
<ClInclude Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.h" />
|
<ClInclude Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.h" />
|
||||||
<ClInclude Include="ControllerInterface\XInput\XInput.h" />
|
<ClInclude Include="ControllerInterface\XInput\XInput.h" />
|
||||||
|
<ClInclude Include="GCAdapter.h" />
|
||||||
<ClInclude Include="GCPadStatus.h" />
|
<ClInclude Include="GCPadStatus.h" />
|
||||||
<ClInclude Include="InputConfig.h" />
|
<ClInclude Include="InputConfig.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -80,4 +88,4 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="ControllerEmu.cpp" />
|
<ClCompile Include="ControllerEmu.cpp" />
|
||||||
|
<ClCompile Include="GCAdapter.cpp" />
|
||||||
<ClCompile Include="InputConfig.cpp" />
|
<ClCompile Include="InputConfig.cpp" />
|
||||||
<ClCompile Include="ControllerInterface\DInput\DInput.cpp">
|
<ClCompile Include="ControllerInterface\DInput\DInput.cpp">
|
||||||
<Filter>ControllerInterface\DInput</Filter>
|
<Filter>ControllerInterface\DInput</Filter>
|
||||||
|
@ -47,6 +48,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="ControllerEmu.h" />
|
<ClInclude Include="ControllerEmu.h" />
|
||||||
|
<ClCompile Include="GCAdapter.h" />
|
||||||
<ClInclude Include="GCPadStatus.h" />
|
<ClInclude Include="GCPadStatus.h" />
|
||||||
<ClInclude Include="InputConfig.h" />
|
<ClInclude Include="InputConfig.h" />
|
||||||
<ClInclude Include="ControllerInterface\DInput\DInput.h">
|
<ClInclude Include="ControllerInterface\DInput\DInput.h">
|
||||||
|
@ -83,4 +85,4 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="CMakeLists.txt" />
|
<Text Include="CMakeLists.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -11,11 +11,10 @@
|
||||||
#include "Common/Logging/LogManager.h"
|
#include "Common/Logging/LogManager.h"
|
||||||
|
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#if defined(__LIBUSB__) || defined (_WIN32)
|
|
||||||
#include "Core/HW/SI_GCAdapter.h"
|
|
||||||
#endif
|
|
||||||
#include "Core/HW/Wiimote.h"
|
#include "Core/HW/Wiimote.h"
|
||||||
|
|
||||||
|
#include "InputCommon/GCAdapter.h"
|
||||||
|
|
||||||
#include "UICommon/UICommon.h"
|
#include "UICommon/UICommon.h"
|
||||||
|
|
||||||
#include "VideoCommon/VideoBackendBase.h"
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
|
@ -30,7 +29,7 @@ void Init()
|
||||||
VideoBackend::PopulateList();
|
VideoBackend::PopulateList();
|
||||||
WiimoteReal::LoadSettings();
|
WiimoteReal::LoadSettings();
|
||||||
#if defined(__LIBUSB__) || defined (_WIN32)
|
#if defined(__LIBUSB__) || defined (_WIN32)
|
||||||
SI_GCAdapter::Init();
|
GCAdapter::Init();
|
||||||
#endif
|
#endif
|
||||||
VideoBackend::ActivateBackend(SConfig::GetInstance().m_strVideoBackend);
|
VideoBackend::ActivateBackend(SConfig::GetInstance().m_strVideoBackend);
|
||||||
|
|
||||||
|
@ -40,7 +39,7 @@ void Init()
|
||||||
void Shutdown()
|
void Shutdown()
|
||||||
{
|
{
|
||||||
#if defined(__LIBUSB__) || defined (_WIN32)
|
#if defined(__LIBUSB__) || defined (_WIN32)
|
||||||
SI_GCAdapter::Shutdown();
|
GCAdapter::Shutdown();
|
||||||
#endif
|
#endif
|
||||||
WiimoteReal::Shutdown();
|
WiimoteReal::Shutdown();
|
||||||
VideoBackend::ClearList();
|
VideoBackend::ClearList();
|
||||||
|
|
Loading…
Reference in New Issue