X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fplugin_lib.c;h=4e65e2e8c7345b4a1f8fbdfb0b206971717736b2;hp=800a1ae40a0630059dfac9ccdd0292b7146b79bb;hb=78d78c3b21fbdc32b73b9e4c9e2719a148c32356;hpb=bd6267e616cc4966fadf971019fe15db2469e97d diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 800a1ae4..4e65e2e8 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -62,12 +62,6 @@ static void print_cpu_usage(void) pl_text_out16(pl_fbdev_w - 28, pl_fbdev_h - 10, "%3d", tick_per_sec); } -int pl_fbdev_init(void) -{ - pl_fbdev_buf = vout_fbdev_flip(layer_fb); - return 0; -} - int pl_fbdev_set_mode(int w, int h, int bpp) { void *ret; @@ -91,7 +85,7 @@ int pl_fbdev_set_mode(int w, int h, int bpp) return (ret != NULL) ? 0 : -1; } -void pl_fbdev_flip(void) +void *pl_fbdev_flip(void) { flip_cnt++; if (g_opts & OPT_SHOWFPS) @@ -101,10 +95,19 @@ void pl_fbdev_flip(void) // let's flip now pl_fbdev_buf = vout_fbdev_flip(layer_fb); + return pl_fbdev_buf; } -void pl_fbdev_finish(void) +int pl_fbdev_open(void) { + pl_fbdev_buf = vout_fbdev_flip(layer_fb); + omap_enable_layer(1); + return 0; +} + +void pl_fbdev_close(void) +{ + omap_enable_layer(0); } static void update_input(void) @@ -187,3 +190,22 @@ void pl_text_out16(int x, int y, const char *texto, ...) pl_text_out16_(x, y, buffer); } +static void pl_get_layer_pos(int *x, int *y, int *w, int *h) +{ + *x = g_layer_x; + *y = g_layer_y; + *w = g_layer_w; + *h = g_layer_h; +} + +extern int UseFrameSkip; // hmh + +const struct rearmed_cbs pl_rearmed_cbs = { + pl_get_layer_pos, + pl_fbdev_open, + pl_fbdev_set_mode, + pl_fbdev_flip, + pl_fbdev_close, + &UseFrameSkip, +}; +