Fix erroneous macro definitions

This commit is contained in:
darkf 2020-04-06 00:54:41 -07:00
parent 3e505f1b5e
commit fed6245e48
4 changed files with 8 additions and 8 deletions

View File

@ -52,7 +52,7 @@ typedef struct EEPROMInfo {
#define XC_END_MARKER (xboxkrnl::XC_VALUE_INDEX)-1
#define EEPROM_INFO_ENTRY(XC, Member, REG_Type) \
{ xboxkrnl::##XC, offsetof(xboxkrnl::XBOX_EEPROM, Member), REG_Type, sizeof(((xboxkrnl::XBOX_EEPROM *)0)->Member) }
{ xboxkrnl::XC, offsetof(xboxkrnl::XBOX_EEPROM, Member), REG_Type, sizeof(((xboxkrnl::XBOX_EEPROM *)0)->Member) }
static const EEPROMInfo EEPROMInfos[] = {
EEPROM_INFO_ENTRY(XC_TIMEZONE_BIAS, UserSettings.TimeZoneBias, REG_DWORD),

View File

@ -636,7 +636,7 @@ const char *NV2AMethodToString(DWORD dwMethod)
switch (dwMethod) {
#define ENUM_RANGED_ToString_N(Name, Method, Pitch, N) \
case Name(N): return #Name ## "((" #N ")*" #Pitch ## ")";
case Name(N): return #Name "((" #N ")*" #Pitch ")";
#define ENUM_RANGED_ToString_1(Name, Method, Pitch) \
ENUM_RANGED_ToString_N(Name, Method, Pitch, 0)

View File

@ -34,13 +34,13 @@
// ******************************************************************
#define DEBUG_START(DEV) \
const char *DebugNV_##DEV##(xbaddr addr) \
const char *DebugNV_##DEV(xbaddr addr) \
{ \
switch (addr) {
#define DEBUG_CASE(a) \
case a: return #a;
#define DEBUG_CASE_EX(a, c) \
case a: return #a##c;
case a: return #a c;
#define DEBUG_END(DEV) \
default: \
return "Unknown " #DEV " Address"; \

View File

@ -158,11 +158,11 @@ static void update_irq(NV2AState *d)
#include "EmuNV2A_DEBUG.cpp"
#define DEBUG_READ32(DEV) EmuLog(LOG_LEVEL::DEBUG, "Rd32 NV2A " #DEV "(0x%08X) = 0x%08X [Handled %s]", addr, result, DebugNV_##DEV##(addr))
#define DEBUG_READ32_UNHANDLED(DEV) { EmuLog(LOG_LEVEL::DEBUG, "Rd32 NV2A " #DEV "(0x%08X) = 0x%08X [Unhandled %s]", addr, result, DebugNV_##DEV##(addr)); return result; }
#define DEBUG_READ32(DEV) EmuLog(LOG_LEVEL::DEBUG, "Rd32 NV2A " #DEV "(0x%08X) = 0x%08X [Handled %s]", addr, result, DebugNV_##DEV(addr))
#define DEBUG_READ32_UNHANDLED(DEV) { EmuLog(LOG_LEVEL::DEBUG, "Rd32 NV2A " #DEV "(0x%08X) = 0x%08X [Unhandled %s]", addr, result, DebugNV_##DEV(addr)); return result; }
#define DEBUG_WRITE32(DEV) EmuLog(LOG_LEVEL::DEBUG, "Wr32 NV2A " #DEV "(0x%08X, 0x%08X) [Handled %s]", addr, value, DebugNV_##DEV##(addr))
#define DEBUG_WRITE32_UNHANDLED(DEV) { EmuLog(LOG_LEVEL::DEBUG, "Wr32 NV2A " #DEV "(0x%08X, 0x%08X) [Unhandled %s]", addr, value, DebugNV_##DEV##(addr)); return; }
#define DEBUG_WRITE32(DEV) EmuLog(LOG_LEVEL::DEBUG, "Wr32 NV2A " #DEV "(0x%08X, 0x%08X) [Handled %s]", addr, value, DebugNV_##DEV(addr))
#define DEBUG_WRITE32_UNHANDLED(DEV) { EmuLog(LOG_LEVEL::DEBUG, "Wr32 NV2A " #DEV "(0x%08X, 0x%08X) [Unhandled %s]", addr, value, DebugNV_##DEV(addr)); return; }
#define DEVICE_READ32(DEV) uint32_t EmuNV2A_##DEV##_Read32(NV2AState *d, xbaddr addr)
#define DEVICE_READ32_SWITCH() uint32_t result = 0; switch (addr)