From ffd0d743cceac1715686af44f80779dc877735e0 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 2 Jan 2011 21:10:31 +0200 Subject: [PATCH] plugin_lib: export more functions --- frontend/plugin_lib.c | 7 ++++++- frontend/plugin_lib.h | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 9f9e958c..d69a0b41 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -85,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) @@ -95,6 +95,7 @@ void pl_fbdev_flip(void) // let's flip now pl_fbdev_buf = vout_fbdev_flip(layer_fb); + return pl_fbdev_buf; } int pl_fbdev_open(void) @@ -199,5 +200,9 @@ static void pl_get_layer_pos(int *x, int *y, int *w, int *h) const struct rearmed_cbs pl_rearmed_cbs = { pl_get_layer_pos, + pl_fbdev_open, + pl_fbdev_set_mode, + pl_fbdev_flip, + pl_fbdev_close, }; diff --git a/frontend/plugin_lib.h b/frontend/plugin_lib.h index 6049f967..7a25b817 100644 --- a/frontend/plugin_lib.h +++ b/frontend/plugin_lib.h @@ -23,13 +23,17 @@ extern void *pl_fbdev_buf; int pl_fbdev_open(void); int pl_fbdev_set_mode(int w, int h, int bpp); -void pl_fbdev_flip(void); +void *pl_fbdev_flip(void); void pl_fbdev_close(void); void pl_text_out16(int x, int y, const char *texto, ...); struct rearmed_cbs { - void (*pl_get_layer_pos)(int *x, int *y, int *w, int *h); + void (*pl_get_layer_pos)(int *x, int *y, int *w, int *h); + int (*pl_fbdev_open)(void); + int (*pl_fbdev_set_mode)(int w, int h, int bpp); + void *(*pl_fbdev_flip)(void); + void (*pl_fbdev_close)(void); }; extern const struct rearmed_cbs pl_rearmed_cbs; -- 2.39.2