From 8cd00287cdf59f73931b4096d7bf95f6b5c6ecd4 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 20 Feb 2015 17:27:49 +0300 Subject: [PATCH] Compilation fix --- rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceAudio.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceCamera.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceDbg.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceFiber.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceFios.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceFpu.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceGxm.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceHttp.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceIme.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceLibc.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceLibm.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceLocation.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceMd5.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceMotion.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNet.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNgs.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/scePerf.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/scePgf.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceRtc.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSas.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSha.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSsl.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceTouch.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceUlt.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceVoice.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceXml.cpp | 2 +- rpcs3/Emu/ARMv7/PSVFuncList.h | 15 +++++++++------ rpcs3/Emu/SysCalls/Modules.h | 16 ++++++++-------- rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp | 2 +- rpcs3/Emu/SysCalls/SC_FUNC.h | 14 +++++++------- 64 files changed, 85 insertions(+), 82 deletions(-) diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp index de8d2086af..0a68994608 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp @@ -32,7 +32,7 @@ s32 sceAppMgrReleaseBgmPort() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppMgr, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)(func_ptr)name>(nid, &sceAppMgr, #name, name) psv_log_base sceAppMgr("SceAppMgr", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp index 596e5b47a3..cf044a5034 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp @@ -70,7 +70,7 @@ s32 sceAppUtilLoadSafeMemory(vm::psv::ptr buf, u32 bufSize, s64 offset) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppUtil, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAppUtil, #name, name) psv_log_base sceAppUtil("SceAppUtil", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp index bb6d981706..ec00510930 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp @@ -45,7 +45,7 @@ s32 sceAudioOutGetAdopt(s32 portType) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudio, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudio, #name, name) psv_log_base sceAudio("SceAudio", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp index 0be874d320..a4c051114f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp @@ -20,7 +20,7 @@ s32 sceAudioInInput(s32 port, vm::psv::ptr destPtr) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioIn, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudioIn, #name, name) psv_log_base sceAudioIn("SceAudioIn", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp index 90e144697e..c152d21cfc 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp @@ -120,7 +120,7 @@ s32 sceAudiodecGetInternalError(vm::psv::ptr pCtrl, vm::psv::pt } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudiodec, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudiodec, #name, name) psv_log_base sceAudiodec("SceAudiodec", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp index 54baccfed0..71b82fad55 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp @@ -102,7 +102,7 @@ s32 sceAudioencGetInternalError(vm::psv::ptr pCtrl, vm::psv::pt } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioenc, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudioenc, #name, name) psv_log_base sceAudioenc("SceAudioenc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp index f48be36603..798205f84c 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp @@ -247,7 +247,7 @@ void sceCameraUseCacheMemoryForTrial(s32 isCache) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCamera, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCamera, #name, name) psv_log_base sceCamera("SceCamera", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp index 0c4fd1c4e4..1923b44ee9 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp @@ -31,7 +31,7 @@ s32 sceCodecEnginePmonReset() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCodecEngine, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCodecEngine, #name, name) psv_log_base sceCodecEngine("SceCodecEngine", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp index c7eda0eda3..0b43db1e52 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp @@ -505,7 +505,7 @@ s32 scePhotoReviewDialogAbort() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCommonDialog, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCommonDialog, #name, name) psv_log_base sceCommonDialog("SceCommonDialog", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp b/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp index d0fdfdfdee..11c9a81e95 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp @@ -66,7 +66,7 @@ s32 sceCtrlClearRapidFire(s32 port, s32 idx) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCtrl, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCtrl, #name, name) psv_log_base sceCtrl("SceCtrl", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp index d3cf67fbb5..d888311e01 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp @@ -31,7 +31,7 @@ s32 sceDbgLoggingHandler(vm::psv::ptr pFile, s32 line, s32 severity, } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDbg, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDbg, #name, name) psv_log_base sceDbg("SceDbg", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp index 799d79ae43..2446e01b48 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp @@ -32,7 +32,7 @@ s32 sceKernelDeci4pRegisterCallback(s32 socketid, s32 cbid) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDeci4p, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDeci4p, #name, name) psv_log_base sceDeci4p("SceDeci4pUserp", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp index 7fb127de12..328c4e5fd8 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp @@ -70,7 +70,7 @@ s32 sceZipGetInfo(vm::psv::ptr pSrc, vm::psv::ptr(nid, &sceDeflt, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDeflt, #name, name) psv_log_base sceDeflt("SceDeflt", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp b/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp index 375a970f1a..8497aa903d 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp @@ -85,7 +85,7 @@ s32 sceDisplayUnregisterVblankStartCallback(s32 uid) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDisplay, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDisplay, #name, name) psv_log_base sceDisplay("SceDisplay", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp index e2e2404d4b..f2c6432aeb 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp @@ -81,7 +81,7 @@ s32 sceFiberGetInfo(vm::psv::ptr fiber, vm::psv::ptr fib } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFiber, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceFiber, #name, name) psv_log_base sceFiber("SceFiber", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp index ea8e40c9d0..567ac3826d 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp @@ -802,7 +802,7 @@ void sceFiosIOFilterPsarcDearchiver() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFios, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceFios, #name, name) psv_log_base sceFios("SceFios2", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp index fc2261b591..e303923090 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceFpu; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFpu, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceFpu, #name, name) psv_log_base sceFpu("SceFpu", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp index de34d01bf5..4024696db0 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp @@ -1067,7 +1067,7 @@ s32 sceGxmSetUniformDataF(vm::psv::ptr uniformBuffer, vm::psv::ptr(nid, &sceGxm, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceGxm, #name, name) psv_log_base sceGxm("SceGxm", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp index 6cf627b7af..c60a3b062c 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp @@ -353,7 +353,7 @@ s32 sceHttpsFreeCaList(vm::psv::ptr caList) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceHttp, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceHttp, #name, name) psv_log_base sceHttp("SceHttp", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp index ed5db75de7..2abd44c5d2 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp @@ -30,7 +30,7 @@ s32 sceImeClose() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceIme, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceIme, #name, name) psv_log_base sceIme("SceIme", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp index 4bb75e2ad2..9db70e10be 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp @@ -106,7 +106,7 @@ s32 sceJpegSplitDecodeMJpeg(vm::psv::ptr pCtrl) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpeg, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceJpeg, #name, name) psv_log_base sceJpeg("SceJpeg", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp index 5a23e8b9aa..fe3dd57317 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp @@ -75,7 +75,7 @@ s32 sceJpegEncoderCsc( } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpegEnc, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceJpegEnc, #name, name) psv_log_base sceJpegEnc("SceJpegEnc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp index 22293ffced..641ebe6405 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp @@ -994,7 +994,7 @@ s32 sceIoGetstat(vm::psv::ptr name, vm::psv::ptr buf) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibKernel, #name, &name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceLibKernel, #name, &name) psv_log_base sceLibKernel("sceLibKernel", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp index cb7ed053eb..ce88646e63 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp @@ -246,7 +246,7 @@ namespace sce_libc_func } } -#define REG_FUNC(nid, name) reg_psv_func<&sce_libc_func::name>(nid, &sceLibc, #name, &sce_libc_func::name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)sce_libc_func::name>(nid, &sceLibc, #name, sce_libc_func::name) psv_log_base sceLibc("SceLibc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp index d896a48a33..7c79b3d373 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp @@ -9,7 +9,7 @@ namespace sce_libm_func } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibm, #name, &sce_libm_func::name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)sce_libm_func::name>(nid, &sceLibm, #name, sce_libm_func::name) psv_log_base sceLibm("SceLibm", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp index 59d664032f..db57dd51f9 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp @@ -23,7 +23,7 @@ namespace sce_libstdcxx_func } // Attention: find and set correct original mangled name in third parameter, for example: REG_FUNC(0xAE71DC3, operator_new_nothrow, "_ZnwjRKSt9nothrow_t"); -#define REG_FUNC(nid, name, orig_name) reg_psv_func<&sce_libstdcxx_func::name>(nid, &sceLibstdcxx, orig_name, &sce_libstdcxx_func::name) +#define REG_FUNC(nid, name, orig_name) reg_psv_func<(func_ptr)sce_libstdcxx_func::name>(nid, &sceLibstdcxx, orig_name, sce_libstdcxx_func::name) psv_log_base sceLibstdcxx("SceLibstdcxx", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp index 5f8d0ca406..aa978c14d3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp @@ -14,7 +14,7 @@ s32 sceLiveAreaResourceGetStatus() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLiveArea, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceLiveArea, #name, name) psv_log_base sceLiveArea("SceLiveArea", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp index e3ac3eeb19..456e0a82ca 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp @@ -172,7 +172,7 @@ s32 sceLocationSetGpsEmulationFile(vm::psv::ptr filename) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLocation, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceLocation, #name, name) psv_log_base sceLocation("SceLibLocation", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp index cea6c9dad5..598f1c2a07 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp @@ -35,7 +35,7 @@ s32 sceMd5BlockResult(vm::psv::ptr pContext, vm::psv::ptr dig throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMd5, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceMd5, #name, name) psv_log_base sceMd5("SceMd5", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp index 38a96dcdc8..f6300f7742 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp @@ -111,7 +111,7 @@ s32 sceMotionStopSampling() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMotion, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceMotion, #name, name) psv_log_base sceMotion("SceMotion", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp index 99907aa333..90d1e3f6b4 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp @@ -21,7 +21,7 @@ u32 sceMt19937UInt(vm::psv::ptr pCtx) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMt19937, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceMt19937, #name, name) psv_log_base sceMt19937("SceMt19937", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp index b2a1778bb2..0c5eece73f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp @@ -295,7 +295,7 @@ s32 sceNetGetStatisticsInfo(vm::psv::ptr info, s32 flags) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNet, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNet, #name, name) psv_log_base sceNet("SceNet", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp index 3e15ff5a9e..77f532a199 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp @@ -128,7 +128,7 @@ s32 sceNetCtlAdhocGetInAddr(vm::psv::ptr inaddr) throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNetCtl, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNetCtl, #name, name) psv_log_base sceNetCtl("SceNetCtl", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp index de367ff1fe..f818b0663b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp @@ -429,7 +429,7 @@ s32 sceSulphaNgsTrace(vm::psv::ptr message) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNgs, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNgs, #name, name) psv_log_base sceNgs("SceNgs", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp index bc0a3e2989..68cb0e56ab 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp @@ -208,7 +208,7 @@ s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpBasic, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpBasic, #name, name) psv_log_base sceNpBasic("SceNpBasic", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp index 334c800841..ad1552166e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp @@ -59,7 +59,7 @@ s32 sceNpCmpNpIdInOrder(vm::psv::ptr npid1, vm::psv::ptr(nid, &sceNpCommon, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpCommon, #name, name) psv_log_base sceNpCommon("SceNpCommon", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp index 6f53f3c772..82fda858fe 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp @@ -63,7 +63,7 @@ s32 sceNpManagerGetChatRestrictionFlag(vm::psv::ptr isRestricted) throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpManager, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpManager, #name, name) psv_log_base sceNpManager("SceNpManager", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp index bf2ec68eba..8674527617 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp @@ -1302,7 +1302,7 @@ s32 sceNpMatching2SignalingGetPeerNetInfoResult( throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpMatching, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpMatching, #name, name) psv_log_base sceNpMatching("SceNpMatching2", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp index 99c144004e..8107a63fcc 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp @@ -333,7 +333,7 @@ s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::psv::ptr comment, throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpScore, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpScore, #name, name) psv_log_base sceNpScore("SceNpScore", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp index aa3f1f10ca..2de9d8cf7b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp @@ -136,7 +136,7 @@ s32 sceNpBandwidthTestAbort() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpUtility, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpUtility, #name, name) psv_log_base sceNpUtility("SceNpUtility", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/scePerf.cpp b/rpcs3/Emu/ARMv7/Modules/scePerf.cpp index a7a19d8096..4f35d054f2 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePerf.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePerf.cpp @@ -265,7 +265,7 @@ s32 sceRazorCpuSync() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &scePerf, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &scePerf, #name, name) psv_log_base scePerf("ScePerf", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/scePgf.cpp b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp index 3463cd763c..99a53fe026 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePgf.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp @@ -4,7 +4,7 @@ extern psv_log_base scePgf; -#define REG_FUNC(nid, name) reg_psv_func(nid, &scePgf, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &scePgf, #name, name) psv_log_base scePgf("ScePgf", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp index 58d2b8ec81..cdcd5302fd 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp @@ -40,7 +40,7 @@ s32 scePhotoExportFromFile( throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &scePhotoExport, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &scePhotoExport, #name, name) psv_log_base scePhotoExport("ScePhotoExport", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp index eba197efe8..cd1efdb57d 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp @@ -19,7 +19,7 @@ bool sceRazorCaptureIsInProgress() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRazorCapture, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceRazorCapture, #name, name) psv_log_base sceRazorCapture("SceRazorCapture", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp index ad8b358f52..8dad998c68 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp @@ -190,7 +190,7 @@ s32 sceRtcParseRFC3339(vm::psv::ptr pUtc, vm::psv::ptr pszDateT } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRtc, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceRtc, #name, name) psv_log_base sceRtc("SceRtc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp index b12625e443..bea6b0ad2f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp @@ -150,7 +150,7 @@ s32 sceSasSetEffectParam(u32 delayTime, u32 feedback) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSas, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSas, #name, name) psv_log_base sceSas("SceSas", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp index 37b31f35b4..18c8520feb 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp @@ -33,7 +33,7 @@ s32 sceScreenShotEnable() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceScreenShot, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceScreenShot, #name, name) psv_log_base sceScreenShot("SceScreenShot", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp index 05eeaa3d21..6220a21683 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceSfmt; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSfmt, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSfmt, #name, name) psv_log_base sceSfmt("SceSfmt", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp index 4e8503ad01..7c34f13b43 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSha.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceSha; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSha, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSha, #name, name) psv_log_base sceSha("SceSha", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp index ebab3a25e3..21cd2c1695 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceSqlite; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSqlite, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSqlite, #name, name) psv_log_base sceSqlite("SceSqlite", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp index 6090cf713c..c758b91efe 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp @@ -60,7 +60,7 @@ s32 sceSslFreeSslCertName(vm::psv::ptr certName) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSsl, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSsl, #name, name) psv_log_base sceSsl("SceSsl", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp index effe1df7f6..c8bbd8f729 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp @@ -82,7 +82,7 @@ s32 sceSulphaAgentsUnregister(vm::psv::ptr handles, u32 a } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSulpha, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSulpha, #name, name) psv_log_base sceSulpha("SceSulpha", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp index c39706077b..ae4d00a7f3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp @@ -25,7 +25,7 @@ s32 sceSysmoduleIsLoaded(u16 id) return SCE_OK; // module is loaded } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSysmodule, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSysmodule, #name, name) psv_log_base sceSysmodule("SceSysmodule", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp index ce3b0b3cfa..d43b14d1f6 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp @@ -246,7 +246,7 @@ s32 sceSystemGestureGetTouchEventByEventID(vm::psv::ptr(nid, &sceSystemGesture, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSystemGesture, #name, name) psv_log_base sceSystemGesture("SceSystemGesture", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp index 39979caf12..2058cf7d2a 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp @@ -30,7 +30,7 @@ s32 sceTouchGetSamplingState(u32 port, vm::psv::ptr pState) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceTouch, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceTouch, #name, name) psv_log_base sceTouch("SceTouch", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp index 022be0bc33..80db5be93f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp @@ -541,7 +541,7 @@ s32 sceUltUlthreadGetSelf(vm::psv::ptr> ulthread) throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceUlt, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceUlt, #name, name) psv_log_base sceUlt("SceUlt", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp index ec6552e07a..e441b8b9fc 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp @@ -176,7 +176,7 @@ s32 sceAvcdecDecodeFlush(vm::psv::ptr pCtrl) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVideodec, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceVideodec, #name, name) psv_log_base sceVideodec("SceVideodec", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp index 1048b2f657..d8e8331f18 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp @@ -250,7 +250,7 @@ s32 sceVoiceGetResourceInfo(vm::psv::ptr pInfo) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVoice, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceVoice, #name, name) psv_log_base sceVoice("SceVoice", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp index dffbdac310..0627b88b99 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp @@ -112,7 +112,7 @@ s32 sceVoiceQoSReadPacket(SceVoiceQoSConnectionId connectionId, vm::psv::ptr(nid, &sceVoiceQoS, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceVoiceQoS, #name, name) psv_log_base sceVoiceQoS("SceVoiceQos", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceXml.cpp b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp index 55e03f1816..f8aa8a3d85 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceXml.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceXml; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceXml, #name, name) +#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceXml, #name, name) psv_log_base sceXml("SceXml", []() { diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.h b/rpcs3/Emu/ARMv7/PSVFuncList.h index 8411439c18..12e6d50648 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.h +++ b/rpcs3/Emu/ARMv7/PSVFuncList.h @@ -352,10 +352,10 @@ namespace psv_func_detail return put_func_args(context, args...) || (t == ARG_STACK); } - template + template struct func_binder; - template + template struct func_binder { typedef void(*func_t)(T...); @@ -366,7 +366,7 @@ namespace psv_func_detail } }; - template + template struct func_binder { typedef void(*func_t)(ARMv7Context&, T...); @@ -377,7 +377,7 @@ namespace psv_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(T...); @@ -388,7 +388,7 @@ namespace psv_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(ARMv7Context&, T...); @@ -448,7 +448,7 @@ enum psv_special_function_index : u16 // Do not call directly u32 add_psv_func(psv_func data); // Do not call directly -template void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*_func)(T...)) +template void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*_func)(T...)) { psv_func f; f.nid = nid; @@ -458,6 +458,9 @@ template void reg_psv_func(u32 nid, psv_ add_psv_func(f); } + +typedef void(*func_ptr)(); + // Find registered HLE function by NID psv_func* get_psv_func_by_nid(u32 nid, u32* out_index = nullptr); // Find registered HLE function by its index diff --git a/rpcs3/Emu/SysCalls/Modules.h b/rpcs3/Emu/SysCalls/Modules.h index 409b6a120d..d7a859f7a5 100644 --- a/rpcs3/Emu/SysCalls/Modules.h +++ b/rpcs3/Emu/SysCalls/Modules.h @@ -111,9 +111,9 @@ public: bool RemoveId(u32 id); - template __forceinline u32 AddFunc(const u32 nid, T _func); - template __forceinline u32 AddFunc(const char* name, T _func); - template __forceinline u32 AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func); + template __forceinline u32 AddFunc(const u32 nid, T _func); + template __forceinline u32 AddFunc(const char* name, T _func); + template __forceinline u32 AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func); }; u32 add_ps3_func(ModuleFunc func); @@ -123,19 +123,19 @@ void execute_ps3_func_by_index(PPUThread& CPU, u32 id); void clear_ps3_functions(); u32 get_function_id(const char* name); -template +template __forceinline u32 Module::AddFunc(const u32 nid, T _func) { return add_ps3_func(ModuleFunc(nid, this, ppu_func_detail::_bind_func(_func))); } -template +template __forceinline u32 Module::AddFunc(const char* name, T _func) { return AddFunc(get_function_id(name), _func); } -template +template __forceinline u32 Module::AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func) { SFunc* sf = new SFunc; @@ -163,8 +163,8 @@ __forceinline u32 Module::AddFuncSub(const char group[8], const u64 ops[], const #define REG_SUB(module, group, name, ...) \ static const u64 name ## _table[] = {__VA_ARGS__ , 0}; \ - if (name ## _table[0]) module.AddFuncSub<&name>(group, name ## _table, #name, name) + if (name ## _table[0]) module.AddFuncSub<(void(*)())name>(group, name ## _table, #name, name) -#define REG_FUNC(module, name) module.AddFunc<&name>(#name, name) +#define REG_FUNC(module, name) module.AddFunc<(void(*)())name>(#name, name) #define UNIMPLEMENTED_FUNC(module) module.Error("%s", __FUNCTION__) diff --git a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp index 47592a4080..589393f99b 100644 --- a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp @@ -674,5 +674,5 @@ Module sysPrxForUser("sysPrxForUser", []() REG_FUNC(sysPrxForUser, _sys_printf); - sysPrxForUser.AddFunc<_nid_E75C40F2>(0xE75C40F2, _nid_E75C40F2); + sysPrxForUser.AddFunc<(void(*)())_nid_E75C40F2>(0xE75C40F2, _nid_E75C40F2); }); diff --git a/rpcs3/Emu/SysCalls/SC_FUNC.h b/rpcs3/Emu/SysCalls/SC_FUNC.h index 4ebb750dfe..7e55a17b6b 100644 --- a/rpcs3/Emu/SysCalls/SC_FUNC.h +++ b/rpcs3/Emu/SysCalls/SC_FUNC.h @@ -156,10 +156,10 @@ namespace ppu_func_detail static const bind_arg_type value = is_float ? ARG_FLOAT : (is_vector ? ARG_VECTOR : ARG_GENERAL); }; - template + template struct func_binder; - template + template struct func_binder { typedef void(*func_t)(T...); @@ -170,7 +170,7 @@ namespace ppu_func_detail } }; - template + template struct func_binder { typedef void(*func_t)(PPUThread&, T...); @@ -181,7 +181,7 @@ namespace ppu_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(T...); @@ -192,7 +192,7 @@ namespace ppu_func_detail } }; - template + template struct func_binder { typedef RT(*func_t)(PPUThread&, T...); @@ -205,11 +205,11 @@ namespace ppu_func_detail using bound_func_t = void(*)(PPUThread&); - template + template bound_func_t _bind_func(RT(*_func)(T...)) { return ppu_func_detail::func_binder::do_call; } } -#define bind_func(func) (ppu_func_detail::_bind_func<&func>(func)) +#define bind_func(func) (ppu_func_detail::_bind_func<(void(*)())func>(func))