From 4cada3ccfba298ad32b17902c19fb450fbf95d0e 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/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_real.h | 2 +- Source/VSProps/Base.props | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 048c73d615c9..57076d987c26 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -296,7 +296,7 @@ void Stop() // - Hammertime! g_video_backend->Video_ExitLoop(); } -#if defined(__LIBUSB__) || defined(_WIN32) +#if defined(__LIBUSB__) GCAdapter::ResetRumble(); #endif @@ -697,7 +697,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; @@ -817,7 +817,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 5d325e55b3b9..0f03c68e8f4a 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp @@ -55,7 +55,7 @@ They will also generate a true or false return for UpdateInterrupts() in WII_IPC #include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_real.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 @@ -156,7 +156,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/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_real.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_real.h index b475cf15ee94..827d8cb42927 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_real.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_real.h @@ -4,7 +4,7 @@ #pragma once -#if defined(__LIBUSB__) || defined(_WIN32) +#if defined(__LIBUSB__) #include #include diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props index 4d4c080c3e3e..66013cc4a92b 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)