X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ginge.git;a=blobdiff_plain;f=common%2Fhost_fb.c;h=d0cc7543476b497d8f9cecc7095f36028ae417bc;hp=f577bb94505ad8eaad2e29d35f734feab901476e;hb=2798b18cd4b43be61c95ed1af12b02237424c06f;hpb=7000b522095b21ba16784d02997835d74ecc3375;ds=sidebyside diff --git a/common/host_fb.c b/common/host_fb.c index f577bb9..d0cc754 100644 --- a/common/host_fb.c +++ b/common/host_fb.c @@ -11,7 +11,7 @@ static int host_stride; #if defined(PND) -#include "fbdev.c" +#include "linux/fbdev.c" static struct vout_fbdev *fbdev; static unsigned short host_pal[256]; @@ -31,7 +31,8 @@ int host_video_init(int *stride, int no_dblbuf) if (fbdev_name == NULL) fbdev_name = "/dev/fb1"; - fbdev = vout_fbdev_init(fbdev_name, &w, &h, no_dblbuf); + w = h = 0; + fbdev = vout_fbdev_init(fbdev_name, &w, &h, 16, no_dblbuf); if (fbdev == NULL) return -1; @@ -116,7 +117,7 @@ void host_video_blit16(const unsigned short *src, int w, int h, int stride) #elif defined(WIZ) -#include "warm.c" +#include "warm/warm.c" #include "wiz_video.c" void *host_video_flip(void) @@ -172,17 +173,33 @@ void host_video_blit4(const unsigned char *src, int w, int h, int stride) void host_video_blit8(const unsigned char *src, int w, int h, int stride) { - extern void rotated_blit8(void *dst, const void *linesx4); + if (probably_caanoo) { + unsigned char *dst = host_screen; + int i; + for (i = 0; i < 240; i++, dst += 320, src += stride) + memcpy(dst, src, w); + } + else { + extern void rotated_blit8(void *dst, const void *linesx4); + rotated_blit8(host_screen, src); + } - rotated_blit8(host_screen, src); host_video_flip(); } void host_video_blit16(const unsigned short *src, int w, int h, int stride) { - extern void rotated_blit16(void *dst, const void *linesx4); + if (probably_caanoo) { + unsigned short *dst = host_screen; + int i; + for (i = 0; i < 240; i++, dst += 320, src += stride / 2) + memcpy(dst, src, w*2); + } + else { + extern void rotated_blit16(void *dst, const void *linesx4); + rotated_blit16(host_screen, src); + } - rotated_blit16(host_screen, src); host_video_flip(); } #endif // LOADER