X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fplugin_lib.c;h=35a23c139f851c1e31514b170f05507f74c476a1;hp=e2a0d58e12e788b45bfe2a3540e4581851980ed5;hb=d352cde27e89b1be21bf8f88c3ca79e0eb497165;hpb=5bf843dc7ca2eb95430607b49c0dde6798950317 diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index e2a0d58e..35a23c13 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -28,14 +28,18 @@ int pl_fbdev_init(void) int pl_fbdev_set_mode(int w, int h, int bpp) { - int ret; + void *ret; pl_fbdev_w = w; - printf("set mode %dx%d@%d\n", w, h, bpp); + + vout_fbdev_clear(layer_fb); ret = vout_fbdev_resize(layer_fb, w, h, bpp, 0, 0, 0, 0, 3); - if (ret) + if (ret == NULL) fprintf(stderr, "failed to set mode\n"); - return ret; + else + pl_fbdev_buf = ret; + + return (ret != NULL) ? 0 : -1; } void *pl_fbdev_flip(void)