1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

[PS2] Implement Pitch support in the ps2_gfx

This commit is contained in:
Francisco Javier Trujillo Mata 2019-03-03 14:08:12 +01:00
parent 5cb2e9f54c
commit 8316d073bc
3 changed files with 7 additions and 11 deletions

View File

@ -39,7 +39,7 @@ RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -
LIBDIR =
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L.
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
#IRX modules
# IRX modules - modules have to be in IRX_DIR

View File

@ -241,21 +241,13 @@ static void frontend_ps2_init(void *data)
static void frontend_ps2_deinit(void *data)
{
(void)data;
#ifndef IS_SALAMANDER
#if defined(HAVE_FILE_LOGGER)
verbosity_disable();
#ifdef HAVE_FILE_LOGGER
command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL);
#endif
#endif
padEnd();
audsrv_quit();
fileXioUmount("pfs0:");
fileXioExit();
SifExitRpc();
}
static void frontend_ps2_exec(const char *path, bool should_load_game)

View File

@ -276,7 +276,11 @@ static bool ps2_gfx_frame(void *data, const void *frame,
bool sendPalette = false;
struct retro_hw_ps2_insets padding = empty_ps2_insets;
if (frame != RETRO_HW_FRAME_BUFFER_VALID){ /* Checking if the transfer is done in the core */
transfer_texture(ps2->coreTexture, frame, width, height, ps2->PSM, ps2->core_filter, 1);
/* calculate proper width based in the pitch */
int bytes_per_pixel = (ps2->PSM == GS_PSM_CT32) ? 4 : 2;
int real_width = pitch / bytes_per_pixel;
transfer_texture(ps2->coreTexture, frame, real_width, height, ps2->PSM, ps2->core_filter, 1);
padding.right = real_width - width;
} else {
sendPalette = ps2->iface.updatedPalette;
ps2->iface.updatedPalette = false;