fbaccel: get rid of USE_OPENGL

it's not really OpenGL we are using but glfb, and this is on
all generic-hw boxes, so use the HAVE_GENERIC_HARDWARE define.
This commit is contained in:
Stefan Seyfried
2013-11-09 15:55:01 +01:00
parent 77ef016271
commit 9fc9e8912e

View File

@@ -52,7 +52,7 @@
#include <linux/stmfb.h> #include <linux/stmfb.h>
#include <bpamem.h> #include <bpamem.h>
#endif #endif
#ifdef USE_OPENGL #if HAVE_GENERIC_HARDWARE
#include <glfb.h> #include <glfb.h>
extern GLFramebuffer *glfb; extern GLFramebuffer *glfb;
#endif #endif
@@ -317,7 +317,7 @@ CFbAccel::~CFbAccel()
if (devmem_fd != -1) if (devmem_fd != -1)
close(devmem_fd); close(devmem_fd);
#endif #endif
#ifndef USE_OPENGL #if ! HAVE_GENERIC_HARDWARE
if (fb->lfb) if (fb->lfb)
munmap(fb->lfb, fb->available); munmap(fb->lfb, fb->available);
if (fb->fd > -1) if (fb->fd > -1)
@@ -921,7 +921,7 @@ void CFbAccel::_blit()
/* not azbox and not spark -> no blit() needed */ /* not azbox and not spark -> no blit() needed */
void CFbAccel::_blit() void CFbAccel::_blit()
{ {
#ifdef USE_OPENGL #if HAVE_GENERIC_HARDWARE
if (glfb) if (glfb)
glfb->blit(); glfb->blit();
#endif #endif
@@ -945,7 +945,7 @@ bool CFbAccel::init(void)
fb_pixel_t *lfb; fb_pixel_t *lfb;
fb->lfb = NULL; fb->lfb = NULL;
fb->fd = -1; fb->fd = -1;
#ifdef USE_OPENGL #if HAVE_GENERIC_HARDWARE
if (!glfb) { if (!glfb) {
fprintf(stderr, "CFbAccel::init: GL Framebuffer is not set up? we are doomed...\n"); fprintf(stderr, "CFbAccel::init: GL Framebuffer is not set up? we are doomed...\n");
return false; return false;
@@ -988,7 +988,7 @@ bool CFbAccel::init(void)
perror("mmap"); perror("mmap");
return false;; return false;;
} }
#endif #endif /* ! GENERIC_HARDWARE */
memset(lfb, 0, fb->available); memset(lfb, 0, fb->available);
fb->lfb = lfb; fb->lfb = lfb;
@@ -1051,7 +1051,7 @@ int CFbAccel::setMode(void)
si->bits_per_pixel = DEFAULT_BPP; si->bits_per_pixel = DEFAULT_BPP;
fb->stride = si->xres * si->bits_per_pixel / 8; fb->stride = si->xres * si->bits_per_pixel / 8;
#else #else
#ifndef USE_OPENGL #if ! HAVE_GENERIC_HARDWARE
fb_fix_screeninfo _fix; fb_fix_screeninfo _fix;
if (ioctl(fd, FBIOGET_FSCREENINFO, &_fix) < 0) { if (ioctl(fd, FBIOGET_FSCREENINFO, &_fix) < 0) {