From ff46b6906d1f5f059d2a0ceccf918a3354c5385a Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 1 Sep 2013 18:09:56 +0200 Subject: [PATCH] framebuffer_ng: allow to choose blit mode on azbox --- src/driver/fbaccel.cpp | 3 +++ src/driver/framebuffer_ng.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/driver/fbaccel.cpp b/src/driver/fbaccel.cpp index f92882b7c..fa4365658 100644 --- a/src/driver/fbaccel.cpp +++ b/src/driver/fbaccel.cpp @@ -808,8 +808,11 @@ void CFbAccel::blit() #define FBIO_BLIT 0x22 #define FBIO_SET_MANUAL_BLIT _IOW('F', 0x21, __u8) #endif +static bool azblit = getenv("AZBOX_MANUAL_BLIT") ? true : false; void CFbAccel::blit() { + if (!azblit) + return; // blit if (ioctl(fb->fd, FBIO_BLIT) < 0) perror("CFbAccel FBIO_BLIT"); diff --git a/src/driver/framebuffer_ng.cpp b/src/driver/framebuffer_ng.cpp index 3df37406e..ff3d38559 100644 --- a/src/driver/framebuffer_ng.cpp +++ b/src/driver/framebuffer_ng.cpp @@ -426,8 +426,8 @@ fprintf(stderr, "CFrameBuffer::setMode avail: %d active: %d\n", available, activ #define FBIO_SET_MANUAL_BLIT _IOW('F', 0x21, __u8) #define FBIO_BLIT 0x22 #endif - // set manual blit - unsigned char tmp = 1; + // set manual blit if AZBOX_MANUAL_BLIT environment variable is set + unsigned char tmp = getenv("AZBOX_MANUAL_BLIT") ? 1 : 0; if (ioctl(fd, FBIO_SET_MANUAL_BLIT, &tmp)<0) perror("FBIO_SET_MANUAL_BLIT");