From c2c3ed6a76e9d32e7e58034727c22071ed552fcb Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Wed, 16 Oct 2019 00:46:14 +0200 Subject: [PATCH 1/2] Make logs works again for PSP --- frontend/drivers/platform_psp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 9944b26fff..fb94781c2c 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -94,9 +94,9 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[], logger_init(); #elif defined(HAVE_FILE_LOGGER) #ifndef VITA - retro_main_log_file_init("ms0:/temp/retroarch-log.txt"); + retro_main_log_file_init("ms0:/temp/retroarch-log.txt", false); #else - retro_main_log_file_init("ux0:/temp/retroarch-log.txt"); + retro_main_log_file_init("ux0:/temp/retroarch-log.txt", false); #endif #endif #endif From fd75ae487eec524434e6f7d31ce544b8a07c0256 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Wed, 16 Oct 2019 00:46:29 +0200 Subject: [PATCH 2/2] Disable the duplication FPS in PSP --- gfx/drivers/psp1_gfx.c | 41 +++++------------------------------------ 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 132b91afb3..448391cd35 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -471,20 +471,10 @@ static void *psp_init(const video_info_t *video, return psp; } -#if 0 -#define DISPLAY_FPS -#endif - static bool psp_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { -#ifdef DISPLAY_FPS - uint32_t diff; - static uint64_t currentTick,lastTick; - static int frames; - static float fps = 0.0; -#endif psp1_video_t *psp = (psp1_video_t*)data; if (!width || !height) @@ -498,40 +488,19 @@ static bool psp_frame(void *data, const void *frame, if (!psp->hw_render) sceGuSync(0, 0); /* let the core decide when to sync when HW_RENDER */ - pspDebugScreenSetBase(psp->draw_buffer); - - pspDebugScreenSetXY(0,0); - - if (video_info->fps_show) + if (msg) { - pspDebugScreenSetXY(68 - strlen(video_info->fps_text) - 1,0); - pspDebugScreenPuts(video_info->fps_text); - pspDebugScreenSetXY(0,1); - } - - if (msg) + pspDebugScreenSetBase(psp->draw_buffer); + pspDebugScreenSetXY(0,0); pspDebugScreenPuts(msg); + } + if ((psp->vsync)&&(psp->vblank_not_reached)) sceDisplayWaitVblankStart(); psp->vblank_not_reached = true; -#ifdef DISPLAY_FPS - frames++; - sceRtcGetCurrentTick(¤tTick); - diff = currentTick - lastTick; - if(diff > 1000000) - { - fps = (float)frames * 1000000.0 / diff; - lastTick = currentTick; - frames = 0; - } - - pspDebugScreenSetXY(0,0); - pspDebugScreenPrintf("%f", fps); -#endif - psp->draw_buffer = FROM_GU_POINTER(sceGuSwapBuffers()); if (psp->should_resize)