From 11311b2b6920a7ba353b5ee189d2f488c4d1dc76 Mon Sep 17 00:00:00 2001 From: sum2012 Date: Sun, 30 Mar 2014 14:42:29 +0800 Subject: [PATCH] Imp sceUtilityScreenshotContStart --- Core/Dialog/PSPPlaceholderDialog.cpp | 13 +++++++++++++ Core/Dialog/PSPPlaceholderDialog.h | 2 ++ Core/HLE/sceUtility.cpp | 20 ++++++++++++++++---- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/Core/Dialog/PSPPlaceholderDialog.cpp b/Core/Dialog/PSPPlaceholderDialog.cpp index 661a7d38d7..1300d3a5e0 100644 --- a/Core/Dialog/PSPPlaceholderDialog.cpp +++ b/Core/Dialog/PSPPlaceholderDialog.cpp @@ -49,3 +49,16 @@ int PSPPlaceholderDialog::Update(int animSpeed) } return 0; } + +int PSPPlaceholderDialog::ContStart() +{ + // base on JPCSP http://code.google.com/p/jpcsp/source/detail?r=3381 + // be initialized with sceUtilityScreenshotInitStart and the startupType + // parameter has to be PSP_UTILITY_SCREENSHOT_TYPE_CONT_AUTO, otherwise, an + // error is returned. + if (status != SCE_UTILITY_STATUS_SCREENSHOT_UNKNOWN) + return SCE_ERROR_UTILITY_INVALID_STATUS; + // Check with JPCSPTrace log of Dream Club Portable + status = SCE_UTILITY_STATUS_FINISHED; + return 0; +} \ No newline at end of file diff --git a/Core/Dialog/PSPPlaceholderDialog.h b/Core/Dialog/PSPPlaceholderDialog.h index 42fba56520..4aab05809c 100644 --- a/Core/Dialog/PSPPlaceholderDialog.h +++ b/Core/Dialog/PSPPlaceholderDialog.h @@ -26,5 +26,7 @@ public: virtual int Init(); virtual int Update(int animSpeed); + + virtual int ContStart(); }; diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index 7583582342..2bd3c944ec 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -448,7 +448,7 @@ u32 sceUtilityScreenshotShutdownStart() } currentDialogActive = false; int ret = screenshotDialog.Shutdown(); - WARN_LOG(SCEUTILITY, "UNTESTED %08x=sceUtilityScreenshotShutdownStart()",ret); + WARN_LOG(SCEUTILITY, "%08x=sceUtilityScreenshotShutdownStart()",ret); return ret; } @@ -460,7 +460,7 @@ u32 sceUtilityScreenshotUpdate(u32 animSpeed) return SCE_ERROR_UTILITY_WRONG_TYPE; } int ret = screenshotDialog.Update(animSpeed); - WARN_LOG(SCEUTILITY, " %08x=sceUtilityScreenshotUpdate(%d)", ret, animSpeed); + WARN_LOG(SCEUTILITY, "%08x=sceUtilityScreenshotUpdate(%d)", ret, animSpeed); return ret; } @@ -473,10 +473,22 @@ int sceUtilityScreenshotGetStatus() } u32 retval = screenshotDialog.GetStatus(); - WARN_LOG(SCEUTILITY, "UNIMPL %08x=sceUtilityScreenshotGetStatus()", retval); + WARN_LOG(SCEUTILITY, "%08x=sceUtilityScreenshotGetStatus()", retval); return retval; } +u32 sceUtilityScreenshotContStart(u32 paramAddr) +{ + if (currentDialogType != UTILITY_DIALOG_SCREENSHOT) + { + WARN_LOG(SCEUTILITY, "sceUtilityScreenshotUpdate(): wrong dialog type"); + return SCE_ERROR_UTILITY_WRONG_TYPE; + } + u32 ret = screenshotDialog.ContStart(); + WARN_LOG(SCEUTILITY, "%08x=sceUtilityScreenshotContStart(%08x)", ret, paramAddr); + return ret; +} + int sceUtilityGamedataInstallInitStart(u32 paramsAddr) { if (currentDialogActive && currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) @@ -766,7 +778,7 @@ const HLEFunction sceUtility[] = {0xF9E0008C, &WrapU_V, "sceUtilityScreenshotShutdownStart"}, {0xAB083EA9, &WrapU_U, "sceUtilityScreenshotUpdate"}, {0xD81957B7, &WrapI_V, "sceUtilityScreenshotGetStatus"}, - {0x86A03A27, 0, "sceUtilityScreenshotContStart"}, + {0x86A03A27, &WrapU_U, "sceUtilityScreenshotContStart"}, {0x0D5BC6D2, 0, "sceUtilityLoadUsbModule"}, {0xF64910F0, 0, "sceUtilityUnloadUsbModule"},