Skip to content

Commit

Permalink
Add a __LIBUSB__ define
Browse files Browse the repository at this point in the history
This allows us to only check if __LIBUSB__ is defined, which is cleaner
than checking for __LIBUSB__ and _WIN32.
  • Loading branch information
leoetlino committed Sep 7, 2016
1 parent 3eb56cf commit ec06a30
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Source/Core/Core/Core.cpp
Expand Up @@ -296,7 +296,7 @@ void Stop() // - Hammertime!

g_video_backend->Video_ExitLoop();
}
#if defined(__LIBUSB__) || defined(_WIN32)
#if defined(__LIBUSB__)
GCAdapter::ResetRumble();
#endif

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp
Expand Up @@ -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

Expand Down Expand Up @@ -156,7 +156,7 @@ void Reinit()
AddDevice<CWII_IPC_HLE_Device_usb_ven>("/dev/usb/ven");
AddDevice<CWII_IPC_HLE_Device_sdio_slot0>("/dev/sdio/slot0");
AddDevice<CWII_IPC_HLE_Device_stub>("/dev/sdio/slot1");
#if defined(__LIBUSB__) || defined(_WIN32)
#if defined(__LIBUSB__)
AddDevice<CWII_IPC_HLE_Device_hid>("/dev/usb/hid");
#else
AddDevice<CWII_IPC_HLE_Device_stub>("/dev/usb/hid");
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_real.h
Expand Up @@ -4,7 +4,7 @@

#pragma once

#if defined(__LIBUSB__) || defined(_WIN32)
#if defined(__LIBUSB__)
#include <thread>

#include <libusb.h>
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProps/Base.props
Expand Up @@ -51,7 +51,7 @@
<AdditionalIncludeDirectories>$(ExternalsDir)xxhash;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ExternalsDir)zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_UPNP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_UPNP;__LIBUSB__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>PSAPI_VERSION=1;_M_X86=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>SFML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down

0 comments on commit ec06a30

Please sign in to comment.