Display services: Difference between revisions

LayerHandle from symbols
No edit summary
Line 130: Line 130:


== 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 LayerHandle.
Takes a PID-descriptor, a type-0x6 buffer for the output [[#NativeWindow]], a [[#DisplayName]](which was previously used with [[#OpenDisplay]]), an u64 ExternalLayerId, and an u64 [[AM_services|AppletResourceUserId]]. Returns an output u64 LayerHandle.


Official user-processes use an ExternalLayerId stored in a global state field if non-zero, otherwise:
Official user-processes use an ExternalLayerId stored in a global state field if non-zero, otherwise:
Line 140: Line 140:


== CreateStrayLayer ==
== CreateStrayLayer ==
Takes a type-0x6 buffer, an u32, and an u64. Returns two output u64s: ExternalLayerId and LayerHandle.
Takes a type-0x6 buffer for the output [[#NativeWindow]], an u32, and an u64. Returns two output u64s: ExternalLayerId and LayerHandle.


== DestroyStrayLayer ==
== DestroyStrayLayer ==
Line 305: Line 305:
=DisplayName=
=DisplayName=
This is a 0x40-byte block: a NUL-terminated string.
This is a 0x40-byte block: a NUL-terminated string.
=NativeWindow=
Size of this buffer is 0x100-bytes(outbuf size used by official user-processes). Parsed("Deserialize...") by a function called by the code described under [[#OpenLayer]], which executes code with Android symbols.


[[Category:Services]]
[[Category:Services]]