mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-28 15:46:22 +00:00
(PSP) Set input driver during video init
This commit is contained in:
parent
84fa352cd1
commit
23ffadb770
@ -81,10 +81,10 @@ static void init_texture(void *data, const video_info_t *video)
|
|||||||
static void *psp_init(const video_info_t *video,
|
static void *psp_init(const video_info_t *video,
|
||||||
const input_driver_t **input, void **input_data)
|
const input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
*input = NULL;
|
void *pspinput;
|
||||||
*input_data = NULL;
|
|
||||||
(void)video;
|
(void)video;
|
||||||
|
|
||||||
|
|
||||||
if (driver.video_data)
|
if (driver.video_data)
|
||||||
{
|
{
|
||||||
psp1_video_t *psp = (psp1_video_t*)driver.video_data;
|
psp1_video_t *psp = (psp1_video_t*)driver.video_data;
|
||||||
@ -100,6 +100,10 @@ static void *psp_init(const video_info_t *video,
|
|||||||
if (!psp)
|
if (!psp)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
pspinput = input_psp.init();
|
||||||
|
*input = pspinput ? &input_psp : NULL;
|
||||||
|
*input_data = pspinput;
|
||||||
|
|
||||||
init_texture(psp, video);
|
init_texture(psp, video);
|
||||||
|
|
||||||
psp->tex_w = 512;
|
psp->tex_w = 512;
|
||||||
@ -136,10 +140,10 @@ static bool psp_frame(void *data, const void *frame,
|
|||||||
|
|
||||||
sceGuClearColor(GU_COLOR(0.0f,0.0f,0.0f,1.0f));
|
sceGuClearColor(GU_COLOR(0.0f,0.0f,0.0f,1.0f));
|
||||||
sceGuClearDepth(0);
|
sceGuClearDepth(0);
|
||||||
sceGuCopyImage(psp->rgb32 ?GU_PSM_8888:GU_PSM_5650,0,0,width,height,pitch / (psp->rgb32 ? 4 : 2),frame,0,0,512,(void*)0x44088000);
|
sceGuCopyImage(psp->rgb32 ?GU_PSM_8888:GU_PSM_5650,0,0,width,height,pitch / (psp->rgb32 ? 4 : 2),(void*)frame,0,0,512,(void*)0x44088000);
|
||||||
sceGuFinish();
|
sceGuFinish();
|
||||||
sceDisplayWaitVblankStart();
|
sceDisplayWaitVblankStart();
|
||||||
void *frame_ptr = &frame;
|
void *frame_ptr = (void*)&frame;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user