Display services: Difference between revisions

No edit summary
Line 131: Line 131:
== OpenLayer ==
== OpenLayer ==
Takes a PID-descriptor, an type-0x6 buffer, a [[#DisplayName]](which was previously used with [[#OpenDisplay]]), an u64 ExternalLayerId, and an u64 [[AM_services|AppletResourceUserId]]. Returns an output u64.
Takes a PID-descriptor, an type-0x6 buffer, a [[#DisplayName]](which was previously used with [[#OpenDisplay]]), an u64 ExternalLayerId, and an u64 [[AM_services|AppletResourceUserId]]. Returns an output u64.
Official user-processes use an ExternalLayerId stored in a global state field if non-zero, otherwise:
* When AppletResourceUserId==0, [[#CreateStrayLayer]] is used and the output from that is used for ExternalLayerId.
* When AppletResourceUserId!=0, {unknown cmd} is used and the output from that is used for ExternalLayerId.


== CloseLayer ==
== CloseLayer ==
Line 136: Line 140:


== CreateStrayLayer ==
== CreateStrayLayer ==
Takes a type-0x6 buffer, an u32, and an u64. Returns two output u64s.
Takes a type-0x6 buffer, an u32, and an u64. Returns two output u64s, first u64 is an ExternalLayerId.


== DestroyStrayLayer ==
== DestroyStrayLayer ==