Merge pull request #12525 from lioncash/defined

Core: Convert some preprocessor checking to use #ifdef/#if defined() over #if
This commit is contained in:
Admiral H. Curtiss 2024-01-24 18:39:49 +01:00 committed by GitHub
commit 5692e15285
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View File

@ -293,7 +293,7 @@ void DolphinAnalytics::MakeBaseBuilder()
}; };
// Under arm64, we need to call objc_msgSend to recieve a struct. // Under arm64, we need to call objc_msgSend to recieve a struct.
// On x86_64, we need to explicitly call objc_msgSend_stret for a struct. // On x86_64, we need to explicitly call objc_msgSend_stret for a struct.
#if _M_ARM_64 #ifdef _M_ARM_64
#define msgSend objc_msgSend #define msgSend objc_msgSend
#else #else
#define msgSend objc_msgSend_stret #define msgSend objc_msgSend_stret

View File

@ -160,7 +160,7 @@ void FreeLookController::LoadDefaults(const ControllerInterface& ciface)
"if(`Click 3`,`RelativeMouse Y-` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse Y-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown, m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown,
"if(`Click 3`,`RelativeMouse Y+` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse Y+` * 0.10, 0)");
#elif __APPLE__ #elif defined(__APPLE__)
m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp, m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp,
"if(`Left Click`,`RelativeMouse Y-` * 0.10, 0)"); "if(`Left Click`,`RelativeMouse Y-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown, m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown,
@ -191,7 +191,7 @@ void FreeLookController::LoadDefaults(const ControllerInterface& ciface)
"if(`Click 3`,`RelativeMouse X-` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse X-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::YawRight, m_rotation_gyro->SetControlExpression(GyroButtons::YawRight,
"if(`Click 3`,`RelativeMouse X+` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse X+` * 0.10, 0)");
#elif __APPLE__ #elif defined(__APPLE__)
m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft, m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft,
"if(`Right Click`,`RelativeMouse X-` * 0.10, 0)"); "if(`Right Click`,`RelativeMouse X-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::YawRight, m_rotation_gyro->SetControlExpression(GyroButtons::YawRight,

View File

@ -694,7 +694,7 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface)
m_buttons->SetControlExpression(0, "`Click 1`"); m_buttons->SetControlExpression(0, "`Click 1`");
// B // B
m_buttons->SetControlExpression(1, "`Click 3`"); m_buttons->SetControlExpression(1, "`Click 3`");
#elif __APPLE__ #elif defined(__APPLE__)
// A // A
m_buttons->SetControlExpression(0, "`Left Click`"); m_buttons->SetControlExpression(0, "`Left Click`");
// B // B

View File

@ -32,11 +32,11 @@
#include "Core/PowerPC/Profiler.h" #include "Core/PowerPC/Profiler.h"
#include "Core/System.h" #include "Core/System.h"
#if _M_X86_64 #ifdef _M_X86_64
#include "Core/PowerPC/Jit64/Jit.h" #include "Core/PowerPC/Jit64/Jit.h"
#endif #endif
#if _M_ARM_64 #ifdef _M_ARM_64
#include "Core/PowerPC/JitArm64/Jit.h" #include "Core/PowerPC/JitArm64/Jit.h"
#endif #endif
@ -61,12 +61,12 @@ CPUCoreBase* JitInterface::InitJitCore(PowerPC::CPUCore core)
{ {
switch (core) switch (core)
{ {
#if _M_X86_64 #ifdef _M_X86_64
case PowerPC::CPUCore::JIT64: case PowerPC::CPUCore::JIT64:
m_jit = std::make_unique<Jit64>(m_system); m_jit = std::make_unique<Jit64>(m_system);
break; break;
#endif #endif
#if _M_ARM_64 #ifdef _M_ARM_64
case PowerPC::CPUCore::JITARM64: case PowerPC::CPUCore::JITARM64:
m_jit = std::make_unique<JitArm64>(m_system); m_jit = std::make_unique<JitArm64>(m_system);
break; break;

View File

@ -160,7 +160,7 @@ struct PowerPCState
// lscbx // lscbx
u16 xer_stringctrl = 0; u16 xer_stringctrl = 0;
#if _M_X86_64 #ifdef _M_X86_64
// This member exists only for the purpose of an assertion that its offset <= 0x100. // This member exists only for the purpose of an assertion that its offset <= 0x100.
std::tuple<> above_fits_in_first_0x100; std::tuple<> above_fits_in_first_0x100;
@ -234,7 +234,7 @@ struct PowerPCState
void UpdateFPRFSingle(float fvalue); void UpdateFPRFSingle(float fvalue);
}; };
#if _M_X86_64 #ifdef _M_X86_64
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof" #pragma GCC diagnostic ignored "-Winvalid-offsetof"