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