From d46e565bedc87143bf65793c60b74e3bf2967f6f Mon Sep 17 00:00:00 2001 From: Reiko Asakura Date: Fri, 19 Mar 2021 00:20:20 -0400 Subject: Merge common definitions in display.h --- include/common/display.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ include/kernel/display.h | 35 ------------------------------- include/user/display.h | 41 ------------------------------------ 3 files changed, 54 insertions(+), 76 deletions(-) create mode 100644 include/common/display.h delete mode 100644 include/user/display.h diff --git a/include/common/display.h b/include/common/display.h new file mode 100644 index 0000000..756087b --- /dev/null +++ b/include/common/display.h @@ -0,0 +1,54 @@ +/* + Vita Development Suite Libraries +*/ + +#ifndef _VDSUITE_COMMON_DISPLAY_H +#define _VDSUITE_COMMON_DISPLAY_H + +#include_next + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Primary display index + */ +int sceDisplayGetPrimaryHead(void); + +/** + * Get maximum framebuffer resolution + * + * @param[out] width - Maximum width + * @param[out] height - Maximum height + * + * @return 0 on success, < 0 on error. +*/ +int sceDisplayGetMaximumFrameBufResolution(int *width, int *height); + +/** + * Number of vertical blank pulses up to now for a display + * + * @param[in] display - Display index + */ +int sceDisplayGetVcountInternal(int display); + +/** + * Set/Update framebuffer parameters for display + * + * @param[in] head - Use 0 for OLED/LCD and 1 for HDMI + * @param[in] index - Can be 0 or 1 + * @param[in] pParam - Pointer to a ::SceDisplayFrameBuf structure. + * @param[in] sync - One of ::DisplaySetBufSync + * + * @return 0 on success, < 0 on error. + * @note - If NULL is provided as pParam pointer, output is blacked out. +*/ +int sceDisplaySetFrameBufInternal(int head, int index, const SceDisplayFrameBuf *pParam, int sync); + +#ifdef __cplusplus +} +#endif + +#endif /* _VDSUITE_COMMON_DISPLAY_H */ + diff --git a/include/kernel/display.h b/include/kernel/display.h index de92a44..918c12b 100644 --- a/include/kernel/display.h +++ b/include/kernel/display.h @@ -25,19 +25,6 @@ typedef struct SceDisplayFrameBufInfo { unsigned int resolution; //!< Resolution } SceDisplayFrameBufInfo; -/** - * Set/Update framebuffer parameters for display - * - * @param[in] head - Use 0 for OLED/LCD and 1 for HDMI - * @param[in] index - Can be 0 or 1 - * @param[in] pParam - Pointer to a ::SceDisplayFrameBuf structure. - * @param[in] sync - One of ::DisplaySetBufSync - * - * @return 0 on success, < 0 on error. - * @note - If NULL is provided as pParam pointer, output is blacked out. -*/ -int sceDisplaySetFrameBufInternal(int head, int index, const SceDisplayFrameBuf *pParam, int sync); - /** * Get the configured framebuffer information of a head and its framebuffer index for a PID * @@ -53,28 +40,6 @@ int sceDisplaySetFrameBufInternal(int head, int index, const SceDisplayFrameBuf */ int sceDisplayGetProcFrameBufInternal(SceUID pid, int head, int index, SceDisplayFrameBufInfo *info); -/** - * Get maximum framebuffer resolution - * - * @param[out] width - Maximum width - * @param[out] height - Maximum height - * - * @return 0 on success, < 0 on error. -*/ -int sceDisplayGetMaximumFrameBufResolution(int *width, int *height); - -/** - * Primary display index - */ -int sceDisplayGetPrimaryHead(void); - -/** - * Number of vertical blank pulses up to now for a display - * - * @param[in] display - Display index - */ -int sceDisplayGetVcountInternal(int display); - /** * Wait for vertical blank start for display * diff --git a/include/user/display.h b/include/user/display.h deleted file mode 100644 index 645f7b9..0000000 --- a/include/user/display.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Vita Development Suite Libraries -*/ - -#ifndef _VDSUITE_USER_DISPLAY_H -#define _VDSUITE_USER_DISPLAY_H - -#include_next - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Primary display index - */ -int sceDisplayGetPrimaryHead(void); - -/** - * Get maximum framebuffer resolution - * - * @param[out] width - Maximum width - * @param[out] height - Maximum height - * - * @return 0 on success, < 0 on error. -*/ -int sceDisplayGetMaximumFrameBufResolution(int *width, int *height); - -/** - * Number of vertical blank pulses up to now for a display - * - * @param[in] display - Display index - */ -int sceDisplayGetVcountInternal(int display); - -#ifdef __cplusplus -} -#endif - -#endif /* _VDSUITE_USER_DISPLAY_H */ - -- cgit v1.2.3