]> git.webhop.me Git - bs-cst-neutrino-hd.git/commitdiff
fbshot: fix for new driver with higher resolution
authorMarkham <markham001@gmx.de>
Sun, 1 Oct 2017 16:27:20 +0000 (18:27 +0200)
committerMarkham <markham001@gmx.de>
Sun, 1 Oct 2017 16:27:20 +0000 (18:27 +0200)
archive-patches/fbshot_cs_hd2.diff [new file with mode: 0644]
make/applications.mk
make/archives.mk
make/versions.mk

diff --git a/archive-patches/fbshot_cs_hd2.diff b/archive-patches/fbshot_cs_hd2.diff
new file mode 100644 (file)
index 0000000..9ea490a
--- /dev/null
@@ -0,0 +1,38 @@
+--- a/fbshot.c
++++ b/fbshot.c
+@@ -148,6 +148,8 @@
+   pict->bps=fb_varinfo.bits_per_pixel;
+   pict->gray=fb_varinfo.grayscale;
++  int stride=fb_fixinfo.line_length;
++
+   if(fb_fixinfo.visual==FB_VISUAL_PSEUDOCOLOR){
+     pict->colormap=(struct fb_cmap*)malloc(sizeof(struct fb_cmap));
+     pict->colormap->red=(__u16*)malloc(sizeof(__u16)*(1<<pict->bps));
+@@ -203,8 +205,24 @@
+   if (vt_num!=-1)
+     chvt(vt_num);
+-  j= (read(fd, pict->buffer, ((pict->xres * pict->yres) * i) )!=
+-      (pict->xres * pict->yres *i ));
++      /* Workaround for broken osd screenshot with new fb driver
++         and 1280x720 resolution */
++      if ((pict->xres * i) < stride) {
++              char* toBuf = pict->buffer;
++              int fromRead = 0;
++              int ii;
++              for (ii = 0; ii < pict->yres; ii++) {
++                      j = (read(fd, toBuf, pict->xres*i) != (pict->xres *i));
++                      fromRead += stride;
++                      int seekRet = lseek(fd, fromRead, SEEK_SET);
++                      toBuf += pict->xres * i;
++                      if (j != 0)
++                              break;
++              }
++      }
++      else
++              j = (read(fd, pict->buffer, ((pict->xres * pict->yres) * i) ) != (pict->xres * pict->yres *i ));
++
+ #ifdef DEBUG
+   printf("to read:%i read:%i\n",(pict->xres* pict->yres * i), j);     
+ #endif
index 672749f414982ad76685ce6557839ca953ecf4d1..048017a24dfd488be23f9baf4227938158527453 100755 (executable)
@@ -89,14 +89,15 @@ $(D)/hotplug: $(D)/libblkid $(D)/libuuid $(ARCHIVE)/hotplug.tar.gz | $(TARGETPRE
        $(REMOVE)/hotplug
        touch $@
 
-$(D)/fbshot: $(D)/zlib $(ARCHIVE)/fbshot-0.3.tar.gz | $(TARGETPREFIX)
-       $(UNTAR)/fbshot-0.3.tar.gz
-       pushd $(BUILD_TMP)/fbshot-0.3 && \
+$(D)/fbshot: $(D)/zlib $(ARCHIVE)/fbshot-$(FBSHOT_VER).tar.gz | $(TARGETPREFIX)
+       $(UNTAR)/fbshot-$(FBSHOT_VER).tar.gz
+       pushd $(BUILD_TMP)/fbshot-$(FBSHOT_VER) && \
                $(PATCH)/fbshot-0.3-32bit_cs_fb.diff && \
+               $(PATCH)/fbshot_cs_hd2.diff && \
                $(TARGET)-gcc $(TARGET_CFLAGS) $(TARGET_LDFLAGS) fbshot.c -lpng -lz -o $(TARGETPREFIX)/bin/fbshot
                cd $(TARGETPREFIX)/bin && \
                ln -sf fbshot dboxshot
-       $(REMOVE)/fbshot-0.3
+       $(REMOVE)/fbshot-$(FBSHOT_VER)
        touch $@
 
 $(D)/ntp: $(D)/openssl $(ARCHIVE)/ntp-$(NTP_VER).tar.gz | $(TARGETPREFIX)
index 8279e8f24841c48cbea742aa3ac970779c5531b7..512f96b71be07ad22c276f04851defa908be64a3 100755 (executable)
@@ -30,8 +30,8 @@ $(ARCHIVE)/libpng-$(PNG_VER).tar.xz:
 $(ARCHIVE)/hotplug.tar.gz:
        $(WGET) http://www.fhloston-paradise.de/hotplug.tar.gz
 
-$(ARCHIVE)/fbshot-0.3.tar.gz:
-       $(WGET) http://www.fhloston-paradise.de/fbshot-0.3.tar.gz
+$(ARCHIVE)/fbshot-$(FBSHOT_VER).tar.gz:
+       $(WGET) http://distro.ibiblio.org/amigolinux/download/Utils/fbshot/fbshot-$(FBSHOT_VER).tar.gz
 
 $(ARCHIVE)/ffmpeg-git-$(FFMPEG_GIT).tar.gz:
        set -e; cd $(BUILD_TMP); \
index b61c565b14a188daaf5d0e7abec59286399aabdd..ffdff46e030a3d601e0a8b2e52d1577a16a987a9 100644 (file)
@@ -46,6 +46,9 @@ E2FSPROGS_VER=1.42.13
 # C library for parsing XML
 EXPAT_VER = 2.2.0
 
+# Picture from Framebuffer
+FBSHOT_VER = 0.3
+
 # FFMPEG-3.3 | A complete, cross-platform solution to record, convert and stream audio and video
 FFMPEG_GIT = 2ba896f