From cc6680d34ea69fd3f6d82dfa04da8a3b7fe588f1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 29 Jul 2018 14:40:07 +0200 Subject: [PATCH] src/driver/fb_generic.h: use unified define for fb device name Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7c555a7d3a63d349047cbc9c33cbfb743fd0b942 Author: Thilo Graf Date: 2018-07-29 (Sun, 29 Jul 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/fb_accel_arm.cpp | 4 ++-- src/driver/fb_generic.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/driver/fb_accel_arm.cpp b/src/driver/fb_accel_arm.cpp index ff35791b3..70b4fb6b6 100644 --- a/src/driver/fb_accel_arm.cpp +++ b/src/driver/fb_accel_arm.cpp @@ -77,10 +77,10 @@ static int exec_list(void) CFbAccelARM::CFbAccelARM() { fb_name = "armbox framebuffer"; - fb_fd = open("/dev/fb0", O_RDWR); + fb_fd = open(FB_DEVICE, O_RDWR); if (fb_fd < 0) { - printf(LOGTAG "[bcm] /dev/fb0 %m"); + printf(LOGTAG "[bcm] %s %m", FB_DEVICE); } if (exec_list()) { diff --git a/src/driver/fb_generic.h b/src/driver/fb_generic.h index 3b855dfba..d1cfc3226 100644 --- a/src/driver/fb_generic.h +++ b/src/driver/fb_generic.h @@ -76,6 +76,8 @@ typedef struct gradientData_t #define WINDOW_SIZE_MIN 50 // % #define WINDOW_SIZE_SMALL 80 // % +#define FB_DEVICE "/dev/fb0" + /** Ausfuehrung als Singleton */ class CFrameBuffer : public sigc::trackable { @@ -172,7 +174,7 @@ class CFrameBuffer : public sigc::trackable static CFrameBuffer* getInstance(); - virtual void init(const char * const fbDevice = "/dev/fb0"); + virtual void init(const char * const fbDevice = FB_DEVICE); virtual int setMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);