From f3551371560c3cbd37e5dcd5a186b6f45b6e3f2d Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 21 Mar 2013 19:28:20 +0100 Subject: [PATCH] Update native. some stubs and a buildfix. --- Core/HLE/FunctionWrappers.h | 5 +++++ Core/HLE/scePspNpDrm_user.cpp | 16 ++++++++-------- android/jni/MenuScreens.cpp | 7 ++++++- native | 2 +- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Core/HLE/FunctionWrappers.h b/Core/HLE/FunctionWrappers.h index 7bd718a4c..80f142471 100644 --- a/Core/HLE/FunctionWrappers.h +++ b/Core/HLE/FunctionWrappers.h @@ -353,6 +353,11 @@ template void WrapU_CCC RETURN(retval); } +template void WrapI_C() { + int retval = func(Memory::GetCharPointer(PARAM(0))); + RETURN(retval); +} + template void WrapI_CU() { int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1)); RETURN(retval); diff --git a/Core/HLE/scePspNpDrm_user.cpp b/Core/HLE/scePspNpDrm_user.cpp index a9086911a..384cefc2e 100644 --- a/Core/HLE/scePspNpDrm_user.cpp +++ b/Core/HLE/scePspNpDrm_user.cpp @@ -2,21 +2,21 @@ #include "HLE.h" -int sceNpDrmSetLicenseeKey() +int sceNpDrmSetLicenseeKey(u32 npDrmKeyAddr) { - ERROR_LOG(HLE, "UNIMPL sceNpDrmSetLicenseeKey"); + ERROR_LOG(HLE, "UNIMPL sceNpDrmSetLicenseeKey(%08x)", npDrmKeyAddr); return 0; } int sceNpDrmClearLicenseeKey() { - ERROR_LOG(HLE, "UNIMPL sceNpDrmClearLicenseeKey"); + ERROR_LOG(HLE, "UNIMPL sceNpDrmClearLicenseeKey()"); return 0; } -int sceNpDrmRenameCheck() +int sceNpDrmRenameCheck(const char *filename) { - ERROR_LOG(HLE, "UNIMPL sceNpDrmRenameCheck"); + ERROR_LOG(HLE, "UNIMPL sceNpDrmRenameCheck(%s)", filename); return 0; } @@ -52,9 +52,9 @@ int sceKernelLoadExecNpDrm() const HLEFunction sceNpDrm[] = { - {0xA1336091, 0, "sceNpDrmSetLicenseeKey"}, - {0x9B745542, 0, "sceNpDrmClearLicenseeKey"}, - {0x275987D1, 0, "sceNpDrmRenameCheck"}, + {0xA1336091, WrapI_U, "sceNpDrmSetLicenseeKey"}, + {0x9B745542, WrapI_V, "sceNpDrmClearLicenseeKey"}, + {0x275987D1, WrapI_C, "sceNpDrmRenameCheck"}, {0x08d98894, WrapI_U, "sceNpDrmEdataSetupKey"}, {0x219EF5CC, WrapI_U, "sceNpDrmEdataGetDataSize"}, {0x2BAA4294, 0, "sceNpDrmOpen"}, diff --git a/android/jni/MenuScreens.cpp b/android/jni/MenuScreens.cpp index db27b9605..046be148d 100644 --- a/android/jni/MenuScreens.cpp +++ b/android/jni/MenuScreens.cpp @@ -17,6 +17,11 @@ #include #include +#include + +#ifdef _MSC_VER +#define snprintf _snprintf +#endif #include "base/display.h" #include "base/logging.h" @@ -570,7 +575,7 @@ static const char * credits[] = { void CreditsScreen::render() { // TODO: This is kinda ugly, done on every frame... char temp[256]; - snprintf(temp, 256, "PPSSPP %s", PPSSPP_GIT_VERSION); + sprintf(temp, "PPSSPP %s", PPSSPP_GIT_VERSION); credits[0] = (const char *)temp; UIShader_Prepare(); diff --git a/native b/native index 3c160ecb5..b73af1e9c 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 3c160ecb5a848d67e2be5a165ae3a81ff8401fae +Subproject commit b73af1e9c441e6667ab2f05df31cee90ce0cae2a