diff options
Diffstat (limited to 'include/kernel/display.h')
-rw-r--r-- | include/kernel/display.h | 133 |
1 files changed, 2 insertions, 131 deletions
diff --git a/include/kernel/display.h b/include/kernel/display.h index 05a325a..de92a44 100644 --- a/include/kernel/display.h +++ b/include/kernel/display.h @@ -5,56 +5,14 @@ #ifndef _VDSUITE_KERNEL_DISPLAY_H #define _VDSUITE_KERNEL_DISPLAY_H +#include_next <display.h> + #include <stdint.h> -#include <scetypes.h> #ifdef __cplusplus extern "C" { #endif -typedef enum SceDisplayErrorCode { - SCE_DISPLAY_ERROR_OK = 0, - SCE_DISPLAY_ERROR_INVALID_HEAD = (int)0x80290000, - SCE_DISPLAY_ERROR_INVALID_VALUE = (int)0x80290001, - SCE_DISPLAY_ERROR_INVALID_ADDR = (int)0x80290002, - SCE_DISPLAY_ERROR_INVALID_PIXELFORMAT = (int)0x80290003, - SCE_DISPLAY_ERROR_INVALID_PITCH = (int)0x80290004, - SCE_DISPLAY_ERROR_INVALID_RESOLUTION = (int)0x80290005, - SCE_DISPLAY_ERROR_INVALID_UPDATETIMING = (int)0x80290006, - SCE_DISPLAY_ERROR_NO_FRAME_BUFFER = (int)0x80290007, - SCE_DISPLAY_ERROR_NO_PIXEL_DATA = (int)0x80290008 -} SceDisplayErrorCode; - -typedef enum SceDisplayPixelFormat { - SCE_DISPLAY_PIXELFORMAT_A8B8G8R8 = 0x00000000U -} SceDisplayPixelFormat; - -#define SCE_DISPLAY_UPDATETIMING_NEXTHSYNC 0 -#define SCE_DISPLAY_UPDATETIMING_NEXTVSYNC 1 - -// This enum is for backward compatibility with Vitasdk -typedef enum SceDisplaySetBufSync { - SCE_DISPLAY_SETBUF_IMMEDIATE = SCE_DISPLAY_UPDATETIMING_NEXTHSYNC, - SCE_DISPLAY_SETBUF_NEXTFRAME = SCE_DISPLAY_UPDATETIMING_NEXTVSYNC, -} SceDisplaySetBufSync; - -/** - * Structure used with ::sceDisplaySetFrameBuf to set/update framebuffer. - * Original screen resolution is 960x544, but the following resolutions - * can also be supplied as width and height : - * 480x272, 640x368, 720x408 - * - * @note - This structure is returned by ::sceDisplayGetFrameBuf -*/ -typedef struct SceDisplayFrameBuf { - SceSize size; //!< sizeof(SceDisplayFrameBuf) - void *base; //!< Pointer to framebuffer - unsigned int pitch; //!< pitch pixels - unsigned int pixelformat; //!< pixel format (one of ::SceDisplayPixelFormat) - unsigned int width; //!< framebuffer width - unsigned int height; //!< framebuffer height -} SceDisplayFrameBuf; - /** * Extended framebuffer information */ @@ -68,17 +26,6 @@ typedef struct SceDisplayFrameBufInfo { } SceDisplayFrameBufInfo; /** - * Set/Update framebuffer parameters - * - * @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 sceDisplaySetFrameBuf(const SceDisplayFrameBuf *pParam, int sync); - -/** * Set/Update framebuffer parameters for display * * @param[in] head - Use 0 for OLED/LCD and 1 for HDMI @@ -92,18 +39,6 @@ int sceDisplaySetFrameBuf(const SceDisplayFrameBuf *pParam, int sync); int sceDisplaySetFrameBufInternal(int head, int index, const SceDisplayFrameBuf *pParam, int sync); /** - * Get current framebuffer parameters - * - * @param[out] pParam - Pointer to a ::SceDisplayFrameBuf structure - * which will receive framebuffer parameters. - * - * @param[in] sync - One of ::DisplaySetBufSync - * - * @return 0 on success, < 0 on error. -*/ -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. @@ -141,11 +76,6 @@ int sceDisplayGetPrimaryHead(void); int sceDisplayGetVcountInternal(int display); /** - * Wait for vertical blank start - */ -int sceDisplayWaitVblankStart(void); - -/** * Wait for vertical blank start for display * * @param[in] display - Display index @@ -153,11 +83,6 @@ int sceDisplayWaitVblankStart(void); int sceDisplayWaitVblankStartInternal(int display); /** - * Wait for vertical blank start with callback - */ -int sceDisplayWaitVblankStartCB(void); - -/** * Wait for vertical blank start with callback for display * * @param[in] display - Display index @@ -165,13 +90,6 @@ int sceDisplayWaitVblankStartCB(void); int sceDisplayWaitVblankStartCBInternal(int display); /** - * Wait for vertical blank start after specified number of vertical periods - * - * @param[in] vcount - Number of vertical periods before waiting for vertical blank start - */ -int sceDisplayWaitVblankStartMulti(unsigned int vcount); - -/** * Wait for vertical blank start after specified number of vertical periods for display * * @param[in] display - Display index @@ -180,13 +98,6 @@ int sceDisplayWaitVblankStartMulti(unsigned int vcount); int sceDisplayWaitVblankStartMultiInternal(int display, unsigned int vcount); /** - * Wait for vertical blank start with callback after specified number of vertical periods - * - * @param[in] vcount - Number of vertical periods before waiting for vertical blank start - */ -int sceDisplayWaitVblankStartMultiCB(unsigned int vcount); - -/** * Wait for vertical blank start with callback after specified number of vertical periods for display * * @param[in] display - Display index @@ -195,39 +106,6 @@ int sceDisplayWaitVblankStartMultiCB(unsigned int vcount); int sceDisplayWaitVblankStartMultiCBInternal(int display, unsigned int vcount); /** - * Wait for vertical blank start since last update of framebuffer - */ -int sceDisplayWaitSetFrameBuf(void); - -/** - * Wait for vertical blank start with callback since last update of framebuffer - */ -int sceDisplayWaitSetFrameBufCB(void); - -/** - * Wait for vertical blank start after specified number of vertical periods - * since last update of framebuffer. - * - * @param[in] vcount - Number of vertical periods before waiting for vertical blank start - */ -int sceDisplayWaitSetFrameBufMulti(unsigned int vcount); - -/** - * Wait for vertical blank start with callback after specified number of vertical periods - * since last update of framebuffer. - * - * @param[in] vcount - Number of vertical periods before waiting for vertical blank start - */ -int sceDisplayWaitSetFrameBufMultiCB(unsigned int vcount); - -/** - * Register callback to be used at each vertical blank start - * - * @param[in] uid - Callback UID - */ -int sceDisplayRegisterVblankStartCallback(SceUID uid); - -/** * Register callback to be used at each vertical blank start for a display * * @param[in] display - Display index @@ -236,13 +114,6 @@ int sceDisplayRegisterVblankStartCallback(SceUID uid); int sceDisplayRegisterVblankStartCallbackInternal(int display, SceUID uid); /** - * Unregister callback used at each vertical blank start - * - * @param[in] uid - Callback UID - */ -int sceDisplayUnregisterVblankStartCallback(SceUID uid); - -/** * Unregister callback used at each vertical blank start for a display * * @param[in] display - Display index |