wip, thread support and timer
[ginge.git] / common / host_fb.c
CommitLineData
3adc9ccb 1#ifdef LOADER
2#include "../loader/realfuncs.h"
3#endif
4
5#include "fbdev.c"
6#include "host_fb.h"
7
8static struct vout_fbdev *fbdev;
9
10int host_video_init(int *stride, int no_dblbuf)
11{
12 const char *fbdev_name;
13 int w, h;
14
15 fbdev_name = getenv("FBDEV");
16 if (fbdev_name == NULL)
17 fbdev_name = "/dev/fb1";
18
19 fbdev = vout_fbdev_init(fbdev_name, &w, &h, no_dblbuf);
20 *stride = w * 2;
21 return (fbdev != 0) ? 0 : -1;
22}
23
24void *host_video_flip(void)
25{
26 return vout_fbdev_flip(fbdev);
27}