Compilation fix

This commit is contained in:
Nekotekina 2015-02-20 17:27:49 +03:00
parent fdad4019e5
commit 8cd00287cd
64 changed files with 85 additions and 82 deletions

View File

@ -32,7 +32,7 @@ s32 sceAppMgrReleaseBgmPort()
}
#define REG_FUNC(nid, name) reg_psv_func<name>(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", []()
{

View File

@ -70,7 +70,7 @@ s32 sceAppUtilLoadSafeMemory(vm::psv::ptr<void> buf, u32 bufSize, s64 offset)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceAppUtil, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAppUtil, #name, name)
psv_log_base sceAppUtil("SceAppUtil", []()
{

View File

@ -45,7 +45,7 @@ s32 sceAudioOutGetAdopt(s32 portType)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceAudio, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudio, #name, name)
psv_log_base sceAudio("SceAudio", []()
{

View File

@ -20,7 +20,7 @@ s32 sceAudioInInput(s32 port, vm::psv::ptr<void> destPtr)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceAudioIn, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudioIn, #name, name)
psv_log_base sceAudioIn("SceAudioIn", []()
{

View File

@ -120,7 +120,7 @@ s32 sceAudiodecGetInternalError(vm::psv::ptr<SceAudiodecCtrl> pCtrl, vm::psv::pt
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceAudiodec, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudiodec, #name, name)
psv_log_base sceAudiodec("SceAudiodec", []()
{

View File

@ -102,7 +102,7 @@ s32 sceAudioencGetInternalError(vm::psv::ptr<SceAudioencCtrl> pCtrl, vm::psv::pt
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceAudioenc, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceAudioenc, #name, name)
psv_log_base sceAudioenc("SceAudioenc", []()
{

View File

@ -247,7 +247,7 @@ void sceCameraUseCacheMemoryForTrial(s32 isCache)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceCamera, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCamera, #name, name)
psv_log_base sceCamera("SceCamera", []()
{

View File

@ -31,7 +31,7 @@ s32 sceCodecEnginePmonReset()
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceCodecEngine, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCodecEngine, #name, name)
psv_log_base sceCodecEngine("SceCodecEngine", []()
{

View File

@ -505,7 +505,7 @@ s32 scePhotoReviewDialogAbort()
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceCommonDialog, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCommonDialog, #name, name)
psv_log_base sceCommonDialog("SceCommonDialog", []()
{

View File

@ -66,7 +66,7 @@ s32 sceCtrlClearRapidFire(s32 port, s32 idx)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceCtrl, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceCtrl, #name, name)
psv_log_base sceCtrl("SceCtrl", []()
{

View File

@ -31,7 +31,7 @@ s32 sceDbgLoggingHandler(vm::psv::ptr<const char> pFile, s32 line, s32 severity,
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceDbg, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDbg, #name, name)
psv_log_base sceDbg("SceDbg", []()
{

View File

@ -32,7 +32,7 @@ s32 sceKernelDeci4pRegisterCallback(s32 socketid, s32 cbid)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceDeci4p, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDeci4p, #name, name)
psv_log_base sceDeci4p("SceDeci4pUserp", []()
{

View File

@ -70,7 +70,7 @@ s32 sceZipGetInfo(vm::psv::ptr<const void> pSrc, vm::psv::ptr<vm::psv::ptr<const
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceDeflt, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDeflt, #name, name)
psv_log_base sceDeflt("SceDeflt", []()
{

View File

@ -85,7 +85,7 @@ s32 sceDisplayUnregisterVblankStartCallback(s32 uid)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceDisplay, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceDisplay, #name, name)
psv_log_base sceDisplay("SceDisplay", []()
{

View File

@ -81,7 +81,7 @@ s32 sceFiberGetInfo(vm::psv::ptr<SceFiber> fiber, vm::psv::ptr<SceFiberInfo> fib
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceFiber, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceFiber, #name, name)
psv_log_base sceFiber("SceFiber", []()
{

View File

@ -802,7 +802,7 @@ void sceFiosIOFilterPsarcDearchiver()
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceFios, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceFios, #name, name)
psv_log_base sceFios("SceFios2", []()
{

View File

@ -4,7 +4,7 @@
extern psv_log_base sceFpu;
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceFpu, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceFpu, #name, name)
psv_log_base sceFpu("SceFpu", []()
{

View File

@ -1067,7 +1067,7 @@ s32 sceGxmSetUniformDataF(vm::psv::ptr<void> uniformBuffer, vm::psv::ptr<const S
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceGxm, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceGxm, #name, name)
psv_log_base sceGxm("SceGxm", []()
{

View File

@ -353,7 +353,7 @@ s32 sceHttpsFreeCaList(vm::psv::ptr<SceHttpsCaList> caList)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceHttp, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceHttp, #name, name)
psv_log_base sceHttp("SceHttp", []()
{

View File

@ -30,7 +30,7 @@ s32 sceImeClose()
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceIme, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceIme, #name, name)
psv_log_base sceIme("SceIme", []()
{

View File

@ -106,7 +106,7 @@ s32 sceJpegSplitDecodeMJpeg(vm::psv::ptr<SceJpegSplitDecodeCtrl> pCtrl)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceJpeg, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceJpeg, #name, name)
psv_log_base sceJpeg("SceJpeg", []()
{

View File

@ -75,7 +75,7 @@ s32 sceJpegEncoderCsc(
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceJpegEnc, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceJpegEnc, #name, name)
psv_log_base sceJpegEnc("SceJpegEnc", []()
{

View File

@ -994,7 +994,7 @@ s32 sceIoGetstat(vm::psv::ptr<const char> name, vm::psv::ptr<SceIoStat> buf)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceLibKernel, #name, &name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceLibKernel, #name, &name)
psv_log_base sceLibKernel("sceLibKernel", []()
{

View File

@ -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", []()
{

View File

@ -9,7 +9,7 @@ namespace sce_libm_func
}
#define REG_FUNC(nid, name) reg_psv_func<name>(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", []()
{

View File

@ -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", []()
{

View File

@ -14,7 +14,7 @@ s32 sceLiveAreaResourceGetStatus()
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceLiveArea, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceLiveArea, #name, name)
psv_log_base sceLiveArea("SceLiveArea", []()
{

View File

@ -172,7 +172,7 @@ s32 sceLocationSetGpsEmulationFile(vm::psv::ptr<char> filename)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceLocation, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceLocation, #name, name)
psv_log_base sceLocation("SceLibLocation", []()
{

View File

@ -35,7 +35,7 @@ s32 sceMd5BlockResult(vm::psv::ptr<SceMd5Context> pContext, vm::psv::ptr<u8> dig
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceMd5, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceMd5, #name, name)
psv_log_base sceMd5("SceMd5", []()
{

View File

@ -111,7 +111,7 @@ s32 sceMotionStopSampling()
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceMotion, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceMotion, #name, name)
psv_log_base sceMotion("SceMotion", []()
{

View File

@ -21,7 +21,7 @@ u32 sceMt19937UInt(vm::psv::ptr<SceMt19937Context> pCtx)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceMt19937, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceMt19937, #name, name)
psv_log_base sceMt19937("SceMt19937", []()
{

View File

@ -295,7 +295,7 @@ s32 sceNetGetStatisticsInfo(vm::psv::ptr<SceNetStatisticsInfo> info, s32 flags)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNet, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNet, #name, name)
psv_log_base sceNet("SceNet", []()
{

View File

@ -128,7 +128,7 @@ s32 sceNetCtlAdhocGetInAddr(vm::psv::ptr<SceNetInAddr> inaddr)
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNetCtl, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNetCtl, #name, name)
psv_log_base sceNetCtl("SceNetCtl", []()
{

View File

@ -429,7 +429,7 @@ s32 sceSulphaNgsTrace(vm::psv::ptr<const char> message)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNgs, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNgs, #name, name)
psv_log_base sceNgs("SceNgs", []()
{

View File

@ -208,7 +208,7 @@ s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNpBasic, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpBasic, #name, name)
psv_log_base sceNpBasic("SceNpBasic", []()
{

View File

@ -59,7 +59,7 @@ s32 sceNpCmpNpIdInOrder(vm::psv::ptr<const SceNpId> npid1, vm::psv::ptr<const Sc
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNpCommon, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpCommon, #name, name)
psv_log_base sceNpCommon("SceNpCommon", []()
{

View File

@ -63,7 +63,7 @@ s32 sceNpManagerGetChatRestrictionFlag(vm::psv::ptr<s32> isRestricted)
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNpManager, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpManager, #name, name)
psv_log_base sceNpManager("SceNpManager", []()
{

View File

@ -1302,7 +1302,7 @@ s32 sceNpMatching2SignalingGetPeerNetInfoResult(
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNpMatching, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpMatching, #name, name)
psv_log_base sceNpMatching("SceNpMatching2", []()
{

View File

@ -333,7 +333,7 @@ s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::psv::ptr<const char> comment,
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNpScore, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpScore, #name, name)
psv_log_base sceNpScore("SceNpScore", []()
{

View File

@ -136,7 +136,7 @@ s32 sceNpBandwidthTestAbort()
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceNpUtility, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceNpUtility, #name, name)
psv_log_base sceNpUtility("SceNpUtility", []()
{

View File

@ -265,7 +265,7 @@ s32 sceRazorCpuSync()
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &scePerf, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &scePerf, #name, name)
psv_log_base scePerf("ScePerf", []()
{

View File

@ -4,7 +4,7 @@
extern psv_log_base scePgf;
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &scePgf, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &scePgf, #name, name)
psv_log_base scePgf("ScePgf", []()
{

View File

@ -40,7 +40,7 @@ s32 scePhotoExportFromFile(
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &scePhotoExport, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &scePhotoExport, #name, name)
psv_log_base scePhotoExport("ScePhotoExport", []()
{

View File

@ -19,7 +19,7 @@ bool sceRazorCaptureIsInProgress()
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceRazorCapture, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceRazorCapture, #name, name)
psv_log_base sceRazorCapture("SceRazorCapture", []()
{

View File

@ -190,7 +190,7 @@ s32 sceRtcParseRFC3339(vm::psv::ptr<u64> pUtc, vm::psv::ptr<const char> pszDateT
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceRtc, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceRtc, #name, name)
psv_log_base sceRtc("SceRtc", []()
{

View File

@ -150,7 +150,7 @@ s32 sceSasSetEffectParam(u32 delayTime, u32 feedback)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSas, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSas, #name, name)
psv_log_base sceSas("SceSas", []()
{

View File

@ -33,7 +33,7 @@ s32 sceScreenShotEnable()
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceScreenShot, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceScreenShot, #name, name)
psv_log_base sceScreenShot("SceScreenShot", []()
{

View File

@ -4,7 +4,7 @@
extern psv_log_base sceSfmt;
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSfmt, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSfmt, #name, name)
psv_log_base sceSfmt("SceSfmt", []()
{

View File

@ -4,7 +4,7 @@
extern psv_log_base sceSha;
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSha, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSha, #name, name)
psv_log_base sceSha("SceSha", []()
{

View File

@ -4,7 +4,7 @@
extern psv_log_base sceSqlite;
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSqlite, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSqlite, #name, name)
psv_log_base sceSqlite("SceSqlite", []()
{

View File

@ -60,7 +60,7 @@ s32 sceSslFreeSslCertName(vm::psv::ptr<SceSslCertName> certName)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSsl, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSsl, #name, name)
psv_log_base sceSsl("SceSsl", []()
{

View File

@ -82,7 +82,7 @@ s32 sceSulphaAgentsUnregister(vm::psv::ptr<const SceSulphaHandle> handles, u32 a
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSulpha, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSulpha, #name, name)
psv_log_base sceSulpha("SceSulpha", []()
{

View File

@ -25,7 +25,7 @@ s32 sceSysmoduleIsLoaded(u16 id)
return SCE_OK; // module is loaded
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSysmodule, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSysmodule, #name, name)
psv_log_base sceSysmodule("SceSysmodule", []()
{

View File

@ -246,7 +246,7 @@ s32 sceSystemGestureGetTouchEventByEventID(vm::psv::ptr<const SceSystemGestureTo
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceSystemGesture, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceSystemGesture, #name, name)
psv_log_base sceSystemGesture("SceSystemGesture", []()
{

View File

@ -30,7 +30,7 @@ s32 sceTouchGetSamplingState(u32 port, vm::psv::ptr<u32> pState)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceTouch, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceTouch, #name, name)
psv_log_base sceTouch("SceTouch", []()
{

View File

@ -541,7 +541,7 @@ s32 sceUltUlthreadGetSelf(vm::psv::ptr<vm::psv::ptr<SceUltUlthread>> ulthread)
throw __FUNCTION__;
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceUlt, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceUlt, #name, name)
psv_log_base sceUlt("SceUlt", []()
{

View File

@ -176,7 +176,7 @@ s32 sceAvcdecDecodeFlush(vm::psv::ptr<SceAvcdecCtrl> pCtrl)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceVideodec, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceVideodec, #name, name)
psv_log_base sceVideodec("SceVideodec", []()
{

View File

@ -250,7 +250,7 @@ s32 sceVoiceGetResourceInfo(vm::psv::ptr<SceVoiceResourceInfo> pInfo)
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceVoice, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceVoice, #name, name)
psv_log_base sceVoice("SceVoice", []()
{

View File

@ -112,7 +112,7 @@ s32 sceVoiceQoSReadPacket(SceVoiceQoSConnectionId connectionId, vm::psv::ptr<voi
}
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceVoiceQoS, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceVoiceQoS, #name, name)
psv_log_base sceVoiceQoS("SceVoiceQos", []()
{

View File

@ -4,7 +4,7 @@
extern psv_log_base sceXml;
#define REG_FUNC(nid, name) reg_psv_func<name>(nid, &sceXml, #name, name)
#define REG_FUNC(nid, name) reg_psv_func<(func_ptr)name>(nid, &sceXml, #name, name)
psv_log_base sceXml("SceXml", []()
{

View File

@ -352,10 +352,10 @@ namespace psv_func_detail
return put_func_args<g1, f, v>(context, args...) || (t == ARG_STACK);
}
template<void* func, typename RT, typename... T>
template<void(*func)(), typename RT, typename... T>
struct func_binder;
template<void* func, typename... T>
template<void(*func)(), typename... T>
struct func_binder<func, void, T...>
{
typedef void(*func_t)(T...);
@ -366,7 +366,7 @@ namespace psv_func_detail
}
};
template<void* func, typename... T>
template<void(*func)(), typename... T>
struct func_binder<func, void, ARMv7Context&, T...>
{
typedef void(*func_t)(ARMv7Context&, T...);
@ -377,7 +377,7 @@ namespace psv_func_detail
}
};
template<void* func, typename RT, typename... T>
template<void(*func)(), typename RT, typename... T>
struct func_binder
{
typedef RT(*func_t)(T...);
@ -388,7 +388,7 @@ namespace psv_func_detail
}
};
template<void* func, typename RT, typename... T>
template<void(*func)(), typename RT, typename... T>
struct func_binder<func, RT, ARMv7Context&, T...>
{
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* func, typename RT, typename... T> void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*_func)(T...))
template<void(*func)(), typename RT, typename... T> 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* func, typename RT, typename... T> 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

View File

@ -111,9 +111,9 @@ public:
bool RemoveId(u32 id);
template<void* func, typename T> __forceinline u32 AddFunc(const u32 nid, T _func);
template<void* func, typename T> __forceinline u32 AddFunc(const char* name, T _func);
template<void* func, typename T> __forceinline u32 AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func);
template<void(*func)(), typename T> __forceinline u32 AddFunc(const u32 nid, T _func);
template<void(*func)(), typename T> __forceinline u32 AddFunc(const char* name, T _func);
template<void(*func)(), typename T> __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<void* func, typename T>
template<void(*func)(), typename T>
__forceinline u32 Module::AddFunc(const u32 nid, T _func)
{
return add_ps3_func(ModuleFunc(nid, this, ppu_func_detail::_bind_func<func>(_func)));
}
template<void* func, typename T>
template<void(*func)(), typename T>
__forceinline u32 Module::AddFunc(const char* name, T _func)
{
return AddFunc<func>(get_function_id(name), _func);
}
template<void* func, typename T>
template<void(*func)(), typename T>
__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__)

View File

@ -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);
});

View File

@ -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<void* func, typename RT, typename... T>
template<void(*func)(), typename RT, typename... T>
struct func_binder;
template<void* func, typename... T>
template<void(*func)(), typename... T>
struct func_binder<func, void, T...>
{
typedef void(*func_t)(T...);
@ -170,7 +170,7 @@ namespace ppu_func_detail
}
};
template<void* func, typename... T>
template<void(*func)(), typename... T>
struct func_binder<func, void, PPUThread&, T...>
{
typedef void(*func_t)(PPUThread&, T...);
@ -181,7 +181,7 @@ namespace ppu_func_detail
}
};
template<void* func, typename RT, typename... T>
template<void(*func)(), typename RT, typename... T>
struct func_binder
{
typedef RT(*func_t)(T...);
@ -192,7 +192,7 @@ namespace ppu_func_detail
}
};
template<void* func, typename RT, typename... T>
template<void(*func)(), typename RT, typename... T>
struct func_binder<func, RT, PPUThread&, T...>
{
typedef RT(*func_t)(PPUThread&, T...);
@ -205,11 +205,11 @@ namespace ppu_func_detail
using bound_func_t = void(*)(PPUThread&);
template<void* func, typename RT, typename... T>
template<void(*func)(), typename RT, typename... T>
bound_func_t _bind_func(RT(*_func)(T...))
{
return ppu_func_detail::func_binder<func, RT, T...>::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))