From 478216725b77d1c7fd45d972e3c596134633adba Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 29 Oct 2011 01:15:39 +0300 Subject: [PATCH] frontend: fix screenshot functionality for pollux --- frontend/main.c | 1 + frontend/plat.h | 1 + frontend/plat_dummy.c | 5 +++++ frontend/plat_pollux.c | 9 +++++++++ frontend/plugin_lib.c | 5 +++++ 5 files changed, 21 insertions(+) diff --git a/frontend/main.c b/frontend/main.c index bf5f35fd..aaf1bb0f 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -20,6 +20,7 @@ #include "plugin_lib.h" #include "pcnt.h" #include "menu.h" +#include "plat.h" #include "../libpcsxcore/misc.h" #include "../libpcsxcore/new_dynarec/new_dynarec.h" #include "../plugins/cdrcimg/cdrcimg.h" diff --git a/frontend/plat.h b/frontend/plat.h index 4f3ab81c..85290cd4 100644 --- a/frontend/plat.h +++ b/frontend/plat.h @@ -1,3 +1,4 @@ +void *plat_prepare_screenshot(int *w, int *h, int *bpp); int plat_rescan_inputs(void); int plat_cpu_clock_get(void); int plat_cpu_clock_apply(int cpu_clock); diff --git a/frontend/plat_dummy.c b/frontend/plat_dummy.c index 0b5f0909..058ef1b8 100644 --- a/frontend/plat_dummy.c +++ b/frontend/plat_dummy.c @@ -48,6 +48,11 @@ void in_update_analogs(void) { } +void *plat_prepare_screenshot(int *w, int *h, int *bpp) +{ + return 0; +} + int plat_rescan_inputs(void) { return -1; diff --git a/frontend/plat_pollux.c b/frontend/plat_pollux.c index b237110a..fd9c3259 100644 --- a/frontend/plat_pollux.c +++ b/frontend/plat_pollux.c @@ -244,6 +244,15 @@ void plat_video_menu_leave(void) pollux_changemode(psx_bpp, 1); } +void *plat_prepare_screenshot(int *w, int *h, int *bpp) +{ + bgr555_to_rgb565(pl_vout_buf, pl_vout_buf, 320*240*2); + *w = 320; + *h = 240; + *bpp = psx_bpp; + return pl_vout_buf; +} + static void pl_vout_set_raw_vram(void *vram) { int i; diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 0e697439..9003ff8b 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -24,6 +24,7 @@ #include "omap.h" #include "menu.h" #include "main.h" +#include "plat.h" #include "pcnt.h" #include "pl_gun_ts.h" #include "../libpcsxcore/new_dynarec/new_dynarec.h" @@ -209,11 +210,15 @@ static void pl_vout_close(void) void *pl_prepare_screenshot(int *w, int *h, int *bpp) { +#if defined(VOUT_FBDEV) *w = pl_vout_w; *h = pl_vout_h; *bpp = pl_vout_bpp; return pl_vout_buf; +#else + return plat_prepare_screenshot(w, h, bpp); +#endif } static void update_input(void) -- 2.39.5