From 3cb18ac5a92c64882915b7b754df8b1b31ebfd0f Mon Sep 17 00:00:00 2001 From: Eriksson Monteiro Date: Tue, 8 Apr 2014 00:41:09 +0100 Subject: [PATCH] fix trailing comma in array --- rpcs3/Emu/SysCalls/Modules/libmixer.cpp | 6 ++--- rpcs3/Emu/SysCalls/Modules/libsynth2.cpp | 34 ++++++++++++------------ rpcs3/Emu/SysCalls/SysCalls.h | 8 ++++-- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/rpcs3/Emu/SysCalls/Modules/libmixer.cpp b/rpcs3/Emu/SysCalls/Modules/libmixer.cpp index ffcb0b6176..d0feeb26e9 100644 --- a/rpcs3/Emu/SysCalls/Modules/libmixer.cpp +++ b/rpcs3/Emu/SysCalls/Modules/libmixer.cpp @@ -941,7 +941,7 @@ void libmixer_init() 0xf000000048000000 // b ); - REG_SUB(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDB); - REG_SUB(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDBIndex); - REG_SUB(libmixer, "surmxUti", cellSurMixerUtilNoteToRatio); + REG_SUB_EMPTY(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDB); + REG_SUB_EMPTY(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDBIndex); + REG_SUB_EMPTY(libmixer, "surmxUti", cellSurMixerUtilNoteToRatio); } \ No newline at end of file diff --git a/rpcs3/Emu/SysCalls/Modules/libsynth2.cpp b/rpcs3/Emu/SysCalls/Modules/libsynth2.cpp index 7262ddc67b..bd0cf23d0e 100644 --- a/rpcs3/Emu/SysCalls/Modules/libsynth2.cpp +++ b/rpcs3/Emu/SysCalls/Modules/libsynth2.cpp @@ -112,7 +112,7 @@ u16 cellSoundSynth2Pitch2Note(u16 center_note, u16 center_fine, u16 pitch) void libsynth2_init() { - REG_SUB(libsynth2, "synth2", cellSoundSynth2Init, + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Init, /* 0xffffffff7d800026, 0xfffffffff821ff41, @@ -140,20 +140,20 @@ void libsynth2_init() 0xffffffff3ba00000, */ ); - REG_SUB(libsynth2, "synth2", cellSoundSynth2Exit); - REG_SUB(libsynth2, "synth2", cellSoundSynth2Config); - REG_SUB(libsynth2, "synth2", cellSoundSynth2GetAddr); - REG_SUB(libsynth2, "synth2", cellSoundSynth2GetParam); - REG_SUB(libsynth2, "synth2", cellSoundSynth2GetSwitch); - REG_SUB(libsynth2, "synth2", cellSoundSynth2SetAddr); - REG_SUB(libsynth2, "synth2", cellSoundSynth2SetParam); - REG_SUB(libsynth2, "synth2", cellSoundSynth2SetSwitch); - REG_SUB(libsynth2, "synth2", cellSoundSynth2SetEffectMode); - REG_SUB(libsynth2, "synth2", cellSoundSynth2SetEffectAttr); - REG_SUB(libsynth2, "synth2", cellSoundSynth2Note2Pitch); - REG_SUB(libsynth2, "synth2", cellSoundSynth2Pitch2Note); - REG_SUB(libsynth2, "synth2", cellSoundSynth2VoiceTrans); - REG_SUB(libsynth2, "synth2", cellSoundSynth2VoiceTransStatus); - REG_SUB(libsynth2, "synth2", cellSoundSynth2SetCoreAttr); - REG_SUB(libsynth2, "synth2", cellSoundSynth2Generate); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Exit); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Config); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2GetAddr); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2GetParam); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2GetSwitch); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetAddr); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetParam); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetSwitch); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetEffectMode); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetEffectAttr); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Note2Pitch); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Pitch2Note); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2VoiceTrans); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2VoiceTransStatus); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetCoreAttr); + REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Generate); } \ No newline at end of file diff --git a/rpcs3/Emu/SysCalls/SysCalls.h b/rpcs3/Emu/SysCalls/SysCalls.h index 8fc92b0471..076b6c78f2 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.h +++ b/rpcs3/Emu/SysCalls/SysCalls.h @@ -470,8 +470,12 @@ void StaticAnalyse(void* ptr, u32 size, u32 base); void StaticExecute(u32 code); void StaticFinalize(); -#define REG_SUB(module, group, name,...) \ - static const u64 name ## _table[] = {__VA_ARGS__ ## 0}; \ +#define REG_SUB(module, group, name, args...) \ + static const u64 name ## _table[] = {args, 0}; \ + module.AddFuncSub(group, name ## _table, #name, name) + +#define REG_SUB_EMPTY(module, group, name,...) \ + static const u64 name ## _table[] = {0}; \ module.AddFuncSub(group, name ## _table, #name, name) extern u64 get_system_time(); \ No newline at end of file