pandora: tripplebuffer fbdev out, refactoring
[picodrive.git] / platform / pandora / pandora.c
... / ...
CommitLineData
1#include <stdio.h>\r
2#include <stdlib.h>\r
3#include <stdarg.h>\r
4\r
5#include "../linux/sndout_oss.h"\r
6#include "../linux/fbdev.h"\r
7#include "../common/emu.h"\r
8\r
9void plat_early_init(void)\r
10{\r
11}\r
12\r
13void plat_init(void)\r
14{\r
15 int ret, w, h;\r
16\r
17 ret = vout_fbdev_init(&w, &h);\r
18 if (ret != 0) {\r
19 fprintf(stderr, "couldn't init framebuffer\n");\r
20 exit(1);\r
21 }\r
22\r
23 if (w != g_screen_width || h != g_screen_height) {\r
24 fprintf(stderr, "%dx%d not supported\n", w, h);\r
25 vout_fbdev_finish();\r
26 exit(1);\r
27 }\r
28\r
29 // snd\r
30 sndout_oss_init();\r
31}\r
32\r
33void plat_finish(void)\r
34{\r
35 sndout_oss_exit();\r
36 vout_fbdev_finish();\r
37\r
38 printf("all done");\r
39}\r
40\r
41/* lprintf */\r
42void lprintf(const char *fmt, ...)\r
43{\r
44 va_list vl;\r
45\r
46 va_start(vl, fmt);\r
47 vprintf(fmt, vl);\r
48 va_end(vl);\r
49}\r
50\r