video fbdev: expand to support fb resize and stuff
[picodrive.git] / platform / pandora / pandora.c
CommitLineData
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
be672de7 7#include "../linux/oshide.h"\r
74f5e726 8#include "../common/emu.h"\r
3a3947cd 9\r
697746df 10void plat_early_init(void)\r
11{\r
12}\r
13\r
14void plat_init(void)\r
3a3947cd 15{\r
d08e7326 16 int ret, w, h;\r
3a3947cd 17\r
be672de7 18 oshide_init();\r
e708403e 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 36void plat_finish(void)\r
3a3947cd 37{\r
e5ab6faf 38 sndout_oss_exit();\r
d08e7326 39 vout_fbdev_finish();\r
be672de7 40 oshide_finish();\r
3a3947cd 41\r
be672de7 42 printf("all done\n");\r
3a3947cd 43}\r
44\r
45/* lprintf */\r
46void lprintf(const char *fmt, ...)\r
47{\r
48 va_list vl;\r
49\r
50 va_start(vl, fmt);\r
51 vprintf(fmt, vl);\r
52 va_end(vl);\r
53}\r
54\r