PSP2SDK
dirty-f9e4f2d
The free SDK for PSP2
|
00001 00012 #ifndef _PSP2_DISPLAY_H_ 00013 #define _PSP2_DISPLAY_H_ 00014 00015 #include <psp2/types.h> 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 enum { 00022 SCE_DISPLAY_ERROR_OK = 0, 00023 SCE_DISPLAY_ERROR_INVALID_HEAD = 0x80290000, 00024 SCE_DISPLAY_ERROR_INVALID_VALUE = 0x80290001, 00025 SCE_DISPLAY_ERROR_INVALID_ADDR = 0x80290002, 00026 SCE_DISPLAY_ERROR_INVALID_PIXELFORMAT = 0x80290003, 00027 SCE_DISPLAY_ERROR_INVALID_PITCH = 0x80290004, 00028 SCE_DISPLAY_ERROR_INVALID_RESOLUTION = 0x80290005, 00029 SCE_DISPLAY_ERROR_INVALID_UPDATETIMING = 0x80290006, 00030 SCE_DISPLAY_ERROR_NO_FRAME_BUFFER = 0x80290007, 00031 SCE_DISPLAY_ERROR_NO_PIXEL_DATA = 0x80290008 00032 }; 00033 00034 #define PSP2_DISPLAY_PIXELFORMAT_A8B8G8R8 0x00000000U 00035 00036 enum { 00038 PSP2_DISPLAY_SETBUF_IMMEDIATE = 0, 00040 PSP2_DISPLAY_SETBUF_NEXTFRAME = 1 00041 }; 00042 00051 typedef struct SceDisplayFrameBuf { 00052 SceSize size; 00053 void *base; 00054 unsigned int pitch; 00055 unsigned int pixelformat; 00056 unsigned int width; 00057 unsigned int height; 00058 } SceDisplayFrameBuf; 00059 00069 int sceDisplaySetFrameBuf(const SceDisplayFrameBuf *pParam, int sync); 00070 00081 int sceDisplayGetFrameBuf(SceDisplayFrameBuf *pParam, int sync); 00082 00091 int sceDisplayGetRefreshRate(float *pFps); 00092 00096 int sceDisplayGetVcount(void); 00097 00101 int sceDisplayWaitVblankStart(void); 00102 00106 int sceDisplayWaitVblankStartCB(void); 00107 00113 int sceDisplayWaitVblankStartMulti(unsigned int vcount); 00114 00120 int sceDisplayWaitVblankStartMultiCB(unsigned int vcount); 00121 00125 int sceDisplayWaitSetFrameBuf(void); 00126 00130 int sceDisplayWaitSetFrameBufCB(void); 00131 00138 int sceDisplayWaitSetFrameBufMulti(unsigned int vcount); 00139 00146 int sceDisplayWaitSetFrameBufMultiCB(unsigned int vcount); 00147 00153 int sceDisplayRegisterVblankStartCallback(SceUID uid); 00154 00160 int sceDisplayUnregisterVblankStartCallback(SceUID uid); 00161 00162 #ifdef __cplusplus 00163 } 00164 #endif 00165 00166 #endif /* _PSP2_DISPLAY_H_ */