diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index 9cf77b3487..4dcb0e9ff6 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -514,9 +514,11 @@ IPCCommandResult ES::IOCtlV(const IOCtlVRequest& request) case IOCTL_ES_GET_TICKET_FROM_VIEW: return GetTicketFromView(request); + case IOCTL_ES_DELETE_STREAM_KEY: + return DeleteStreamKey(request); + case IOCTL_ES_VERIFYSIGN: case IOCTL_ES_UNKNOWN_3C: - case IOCTL_ES_UNKNOWN_3D: case IOCTL_ES_UNKNOWN_41: case IOCTL_ES_UNKNOWN_42: PanicAlert("IOS-ES: Unimplemented ioctlv 0x%x (%zu in vectors, %zu io vectors)", @@ -643,6 +645,15 @@ s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& tic return IPC_SUCCESS; } + +IPCCommandResult ES::DeleteStreamKey(const IOCtlVRequest& request) +{ + if (!request.HasNumberOfValidVectors(1, 0) || request.in_vectors[0].size != sizeof(u32)) + return GetDefaultReply(ES_EINVAL); + + const u32 handle = Memory::Read_U32(request.in_vectors[0].address); + return GetDefaultReply(m_ios.GetIOSC().DeleteObject(handle, PID_ES)); +} } // namespace Device } // namespace HLE } // namespace IOS diff --git a/Source/Core/Core/IOS/ES/ES.h b/Source/Core/Core/IOS/ES/ES.h index 543768c144..a918a72d49 100644 --- a/Source/Core/Core/IOS/ES/ES.h +++ b/Source/Core/Core/IOS/ES/ES.h @@ -184,7 +184,7 @@ private: IOCTL_ES_DIGETTMD = 0x3A, IOCTL_ES_DIVERIFY_WITH_VIEW = 0x3B, IOCTL_ES_UNKNOWN_3C = 0x3C, - IOCTL_ES_UNKNOWN_3D = 0x3D, + IOCTL_ES_DELETE_STREAM_KEY = 0x3D, IOCTL_ES_DELETE_CONTENT = 0x3E, IOCTL_ES_INVALID_3F = 0x3F, IOCTL_ES_GET_V0_TICKET_FROM_VIEW = 0x40, @@ -234,6 +234,7 @@ private: IPCCommandResult Launch(const IOCtlVRequest& request); IPCCommandResult LaunchBC(const IOCtlVRequest& request); IPCCommandResult DIVerify(const IOCtlVRequest& request); + IPCCommandResult DeleteStreamKey(const IOCtlVRequest& request); // Title contents IPCCommandResult OpenTitleContent(u32 uid, const IOCtlVRequest& request);