From 59a17db6c42b55792e1712eb9e83a22dd2d68076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 7 Sep 2016 23:39:46 +0200 Subject: [PATCH] Add a __LIBUSB__ define This allows us to only check if __LIBUSB__ is defined, which is cleaner than checking for __LIBUSB__ and _WIN32. --- Source/Core/Core/Core.cpp | 6 +++--- Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp | 4 ++-- Source/VSProps/Base.props | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 73b4079a80..b8cd1e2733 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -297,7 +297,7 @@ void Stop() // - Hammertime! g_video_backend->Video_ExitLoop(); } -#if defined(__LIBUSB__) || defined(_WIN32) +#if defined(__LIBUSB__) GCAdapter::ResetRumble(); #endif @@ -698,7 +698,7 @@ void SetState(EState state) // stopped (including the CPU). CPU::EnableStepping(true); // Break Wiimote::Pause(); -#if defined(__LIBUSB__) || defined(_WIN32) +#if defined(__LIBUSB__) GCAdapter::ResetRumble(); #endif break; @@ -818,7 +818,7 @@ bool PauseAndLock(bool do_lock, bool unpause_on_unlock) // (s_efbAccessRequested). Fifo::PauseAndLock(do_lock, false); -#if defined(__LIBUSB__) || defined(_WIN32) +#if defined(__LIBUSB__) GCAdapter::ResetRumble(); #endif diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp index d7f655c105..e52273f673 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp @@ -54,7 +54,7 @@ They will also generate a true or false return for UpdateInterrupts() in WII_IPC #include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h" #include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_ven.h" -#if defined(__LIBUSB__) || defined(_WIN32) +#if defined(__LIBUSB__) #include "Core/IPC_HLE/WII_IPC_HLE_Device_hid.h" #endif @@ -151,7 +151,7 @@ void Reinit() AddDevice("/dev/usb/ven"); AddDevice("/dev/sdio/slot0"); AddDevice("/dev/sdio/slot1"); -#if defined(__LIBUSB__) || defined(_WIN32) +#if defined(__LIBUSB__) AddDevice("/dev/usb/hid"); #else AddDevice("/dev/usb/hid"); diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props index 4d4c080c3e..66013cc4a9 100644 --- a/Source/VSProps/Base.props +++ b/Source/VSProps/Base.props @@ -51,7 +51,7 @@ $(ExternalsDir)xxhash;%(AdditionalIncludeDirectories) $(ExternalsDir)zlib;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - USE_UPNP;%(PreprocessorDefinitions) + USE_UPNP;__LIBUSB__;%(PreprocessorDefinitions) PSAPI_VERSION=1;_M_X86=1;%(PreprocessorDefinitions) SFML_STATIC;%(PreprocessorDefinitions) CURL_STATICLIB;%(PreprocessorDefinitions)