From fe335496cbf2c619623bc600a8166633436d99af Mon Sep 17 00:00:00 2001 From: Sergi Granell Date: Fri, 27 Oct 2017 00:35:18 +0200 Subject: Add ksceDisplayGetFrameBufInfoForPid NID and prototype --- include/kernel/display.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'include/kernel/display.h') diff --git a/include/kernel/display.h b/include/kernel/display.h index cdc3672..7d0251b 100644 --- a/include/kernel/display.h +++ b/include/kernel/display.h @@ -48,6 +48,18 @@ typedef struct SceDisplayFrameBuf { unsigned int height; //!< framebuffer height } SceDisplayFrameBuf; +/** + * Extended framebuffer information +*/ +typedef struct SceDisplayFrameBufInfo { + SceSize size; //!< sizeof(SceDisplayFrameBufInfo) + SceUID pid; //!< PID of the process owning this framebuffer + unsigned int vblankcount; //!< Amount of VBlanks this framebuffer has been displayed + uintptr_t paddr; //!< Physical address + SceDisplayFrameBuf framebuf; //!< SceDisplayFrameBuf information + unsigned int resolution; //!< Resolution +} SceDisplayFrameBufInfo; + /** * Set/Update framebuffer parameters * @@ -71,6 +83,21 @@ int sceDisplaySetFrameBuf(const SceDisplayFrameBuf *pParam, int sync); */ int sceDisplayGetFrameBuf(SceDisplayFrameBuf *pParam, int sync); +/** + * Get the configured framebuffer information of a head and its framebuffer index for a PID + * + * @param[in] pid - PID of the process to get the framebuffer information from. + * It can either be a vallid PID, -1 to use the current configured + * framebuffer for the head and index, or 0 to use the PID of the caller. + * @param[in] head - Use 0 for OLED/LCD and 1 for HDMI + * @param[in] index - Can be 0 or 1 + * @param[out] info - Pointer to a ::SceDisplayFrameBufInfo structure + * which will receive the framebuffer information. + * + * @return 0 on success, < 0 on error. +*/ +int sceDisplayGetFrameBufInfoForPid(SceUID pid, int head, int index, SceDisplayFrameBufInfo *info); + /** * Get maximum framebuffer resolution * -- cgit v1.2.3