mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-26 04:45:18 -06:00
#if -> #ifdef
This commit is contained in:
parent
e455686590
commit
ca3a165114
@ -131,9 +131,9 @@ option(ENABLE_SDL "Enables the SDLController backend" ON)
|
||||
option(ENABLE_LIBUSB "Build with libusb support" ON)
|
||||
|
||||
if (ENABLE_LIBUSB)
|
||||
add_compile_definitions(HAS_LIBUSB=1)
|
||||
add_compile_definitions(HAS_LIBUSB)
|
||||
else()
|
||||
add_compile_definitions(HAS_LIBUSB=0)
|
||||
add_compile_definitions(HAS_LIBUSB)
|
||||
endif()
|
||||
|
||||
# audio backends
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include "nsyshid.h"
|
||||
#include "Backend.h"
|
||||
#include "BackendEmulated.h"
|
||||
#if HAS_LIBUSB
|
||||
#ifdef HAS_LIBUSB
|
||||
#include "BackendLibusb.h"
|
||||
#endif
|
||||
|
||||
@ -9,7 +9,7 @@ namespace nsyshid::backend
|
||||
{
|
||||
void AttachDefaultBackends()
|
||||
{
|
||||
#if HAS_LIBUSB
|
||||
#ifdef HAS_LIBUSB
|
||||
// add libusb backend
|
||||
{
|
||||
auto backendLibusb = std::make_shared<backend::libusb::BackendLibusb>();
|
||||
|
||||
@ -29,7 +29,7 @@ namespace nsyshid::backend::emulated
|
||||
auto device = std::make_shared<SkylanderPortalDevice>();
|
||||
AttachDevice(device);
|
||||
}
|
||||
#if HAS_LIBUSB
|
||||
#ifdef HAS_LIBUSB
|
||||
else if (auto usb_portal = FindDeviceById(0x1430, 0x1F17))
|
||||
{
|
||||
cemuLog_logDebug(LogType::Force, "Attaching Xbox 360 Portal");
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
namespace nsyshid
|
||||
{
|
||||
#if HAS_LIBUSB
|
||||
#ifdef HAS_LIBUSB
|
||||
SkylanderXbox360PortalLibusb::SkylanderXbox360PortalLibusb(std::shared_ptr<Device> usbPortal)
|
||||
: Device(0x1430, 0x0150, 1, 2, 0)
|
||||
{
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "nsyshid.h"
|
||||
#if HAS_LIBUSB
|
||||
#ifdef HAS_LIBUSB
|
||||
#include "BackendLibusb.h"
|
||||
#include "g721/g721.h"
|
||||
#endif
|
||||
|
||||
namespace nsyshid
|
||||
{
|
||||
#if HAS_LIBUSB
|
||||
#ifdef HAS_LIBUSB
|
||||
class SkylanderXbox360PortalLibusb final : public Device {
|
||||
public:
|
||||
SkylanderXbox360PortalLibusb(std::shared_ptr<Device> usbPortal);
|
||||
|
||||
@ -83,7 +83,7 @@ ControllerPtr ControllerFactory::CreateController(InputAPI::Type api, std::strin
|
||||
return std::make_shared<DSUController>(index);
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && HAS_LIBUSB
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && defined(HAS_LIBUSB)
|
||||
case InputAPI::GameCube:
|
||||
{
|
||||
const auto index = uuid.find_first_of('_');
|
||||
@ -165,7 +165,7 @@ ControllerProviderPtr ControllerFactory::CreateControllerProvider(InputAPI::Type
|
||||
}
|
||||
|
||||
#endif
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && HAS_LIBUSB
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && defined(HAS_LIBUSB)
|
||||
case InputAPI::GameCube:
|
||||
return std::make_shared<GameCubeControllerProvider>();
|
||||
#endif
|
||||
|
||||
@ -40,7 +40,7 @@ InputManager::InputManager()
|
||||
#if HAS_DSU
|
||||
create_provider<DSUControllerProvider>();
|
||||
#endif
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && HAS_LIBUSB
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && defined(HAS_LIBUSB)
|
||||
create_provider<GameCubeControllerProvider>();
|
||||
#endif
|
||||
#if HAS_WIIMOTE
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "input/api/GameCube/GameCubeController.h"
|
||||
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && HAS_LIBUSB
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && defined(HAS_LIBUSB)
|
||||
|
||||
GameCubeController::GameCubeController(uint32 adapter, uint32 index)
|
||||
: base_type(fmt::format("{}_{}", adapter, index), fmt::format("Controller {}", index + 1)), m_adapter(adapter),
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include "input/api/Controller.h"
|
||||
#include "input/api/GameCube/GameCubeControllerProvider.h"
|
||||
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && HAS_LIBUSB
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && defined(HAS_LIBUSB)
|
||||
|
||||
class GameCubeController : public Controller<GameCubeControllerProvider>
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "input/api/GameCube/GameCubeController.h"
|
||||
#include "util/libusbWrapper/libusbWrapper.h"
|
||||
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && HAS_LIBUSB
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && defined(HAS_LIBUSB)
|
||||
|
||||
constexpr uint16_t kVendorId = 0x57e, kProductId = 0x337;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include "input/api/ControllerProvider.h"
|
||||
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && HAS_LIBUSB
|
||||
#if defined(HAS_GAMECUBE) && HAS_GAMECUBE && defined(HAS_LIBUSB)
|
||||
|
||||
#include "util/libusbWrapper/libusbWrapper.h"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user