1.70beta0 pandora release
[libpicofe.git] / pandora / pandora.c
CommitLineData
fe017393 1#include <stdio.h>\r
2#include <stdlib.h>\r
3#include <stdarg.h>\r
fe017393 4\r
b3972d82 5#include "../linux/sndout_oss.h"\r
b188c2b6 6#include "../linux/fbdev.h"\r
b2c5ee47 7#include "../linux/x11h.h"\r
7fd581f4 8#include "../common/emu.h"\r
fe017393 9\r
d2f29611 10void plat_early_init(void)\r
11{\r
12}\r
13\r
14void plat_init(void)\r
fe017393 15{\r
b188c2b6 16 int ret, w, h;\r
fe017393 17\r
b2c5ee47 18 x11h_init();\r
19\r
b188c2b6 20 ret = vout_fbdev_init(&w, &h);\r
21 if (ret != 0) {\r
22 fprintf(stderr, "couldn't init framebuffer\n");\r
f7c40368 23 exit(1);\r
24 }\r
25\r
b188c2b6 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
492d353a 29 exit(1);\r
30 }\r
fe017393 31\r
fe017393 32 // snd\r
b3972d82 33 sndout_oss_init();\r
fe017393 34}\r
35\r
d2f29611 36void plat_finish(void)\r
fe017393 37{\r
b3972d82 38 sndout_oss_exit();\r
b188c2b6 39 vout_fbdev_finish();\r
fe017393 40\r
492d353a 41 printf("all done");\r
fe017393 42}\r
43\r
44/* lprintf */\r
45void 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