summaryrefslogtreecommitdiff
path: root/include/kernel/display.h
diff options
context:
space:
mode:
authorSergi Granell2017-10-27 00:35:18 +0200
committerSergi Granell2017-10-27 00:35:18 +0200
commitfe335496cbf2c619623bc600a8166633436d99af (patch)
tree07ebd81ec06154021ca02f729264b925818f7c67 /include/kernel/display.h
parentFix Display functions naming (diff)
downloadvds-libraries-fe335496cbf2c619623bc600a8166633436d99af.tar.gz
Add ksceDisplayGetFrameBufInfoForPid NID and prototype
Diffstat (limited to '')
-rw-r--r--include/kernel/display.h27
1 files changed, 27 insertions, 0 deletions
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
@@ -49,6 +49,18 @@ typedef struct SceDisplayFrameBuf {
} 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
*
* @param[in] pParam - Pointer to a ::SceDisplayFrameBuf structure.
@@ -72,6 +84,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
*
* @param[out] width - Maximum width