nn::gd::CTR::System::CopyPacket Member Function

Syntax

static nnResult CopyPacket(
     RecordedPacketId * source,
     RecordedPacketId ** packetId,
     Memory::MemoryLocation memory
);

Parameters

Name Description
in source Specifies the saved packet to be copied.
in packetId Specifies the new saved packet ID.
in memory Specifies the memory location at which to save the packetId data.

Return Values

Returns the result of the operation.
Value Description
Result::IsSuccess Process was successful.
ResultNullParameter NULL was specified in an argument.
ResultSystemInvalidPacketId The command list object is invalid, or the saving of the command list object has not started. Be sure to execute StartRecordingPackets.
ResultInvalidMemoryRegion An invalid memory location was specified.
ResultOutOfMemory Could not allocate memory.

Description

Copies a saved packet.

When a packet is created, this function executes if RECORD_COMMAND_LIST_COPY or RECORD_3D_COMMAND_BUFFER_FOR_JUMP has been specified for RecordingPacketUsage. A saved packet specified by RECORD_COMMAND_LIST_COPY cannot be copied to MemoryVRAM. MemoryFCRAM or MemoryVRAM can be specified as the destination to copy RECORD_3D_COMMAND_BUFFER_FOR_JUMP save packets. If a packet is created in MemoryVRAM, a DMA transfer request command is created for copying the packet to VRAM. In this case, you need to check that the original saved packet is released, once DMA transer is finished, before the user uses a new packet.


CONFIDENTIAL