pandora.c 838 B

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