summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/kernel/display.h27
-rw-r--r--nids/360/SceDisplay.yml1
2 files changed, 28 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
diff --git a/nids/360/SceDisplay.yml b/nids/360/SceDisplay.yml
index 40fbe35..a2136db 100644
--- a/nids/360/SceDisplay.yml
+++ b/nids/360/SceDisplay.yml
@@ -31,6 +31,7 @@ modules:
functions:
sceDisplayGetActualViewportConf: 0x40ACFE51
sceDisplayGetFrameBuf: 0xEEDA2E54
+ sceDisplayGetFrameBufInfoForPid: 0x3BC165EF
sceDisplayGetFrameBufInternal: 0x19F94C63
sceDisplayGetMaximumFrameBufResolution: 0x5AFE6CD3
sceDisplayGetPrimaryHead: 0xC8E554C5