--- /dev/null
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if HAVE_COOL_HARDWARE
+#define RC_DEVICE "/dev/input/nevis_ir"
+#define RC_DEVICE_FALLBACK "/dev/input/event0"
+
+#elif HAVE_SPARK_HARDWARE
+#define RC_DEVICE "/dev/input/nevis_ir"
+#define RC_DEVICE_FALLBACK "/dev/input/event1"
+
+#elif HAVE_DUCKBOX_HARDWARE
+#define RC_DEVICE "/dev/input/event0"
+#define RC_DEVICE_FALLBACK "/dev/input/event1"
+#else
+#define RC_DEVICE "/dev/input/event1"
+#define RC_DEVICE_FALLBACK "/dev/input/event0"
+
+#endif
+
#include "gfx.h"
#include "pngw.h"
+#define SH_VERSION 2.15
-#define SH_VERSION 2.14
+#ifndef CONFIGDIR
+#define CONFIGDIR "/var/tuxbox/config"
+#endif
+#ifndef FONTDIR
+#define FONTDIR "/share/fonts"
+#endif
-static char CFG_FILE[128]="/var/tuxbox/config/shellexec.conf";
+#define NCF_FILE CONFIGDIR "/neutrino.conf"
-#define FONT2 "/share/fonts/pakenham.ttf"
+char FONT[128]= FONTDIR "/neutrino.ttf";
// if font is not in usual place, we look here:
-char FONT[128]="/share/fonts/neutrino.ttf";
+#define FONT2 FONTDIR "/pakenham.ttf"
+
+static char CFG_FILE[128]= CONFIGDIR "/shellexec.conf";
// CMCST, CMCS, CMCT, CMC, CMCIT, CMCI, CMHT, CMH
// WHITE, BLUE0, TRANSP, CMS, ORANGE, GREEN, YELLOW, RED
}
//init framebuffer before 1st scale2res
- fb = open(FB_DEVICE, O_RDWR);
+ fb=open(FB_DEVICE, O_RDWR);
+ if (fb < 0)
+ fb=open(FB_DEVICE_FALLBACK, O_RDWR);
if(fb == -1)
{
perror(__plugin__ " <open framebuffer device>");
}
else
desc.face_id = FONT;
- printf("%s <FTC_Manager_LookupFace Font \"%p\" loaded>\n", __plugin__, desc.face_id);
+ printf("%s <FTC_Manager_LookupFace Font \"%s\" loaded>\n", __plugin__, (char*)desc.face_id);
use_kerning = FT_HAS_KERNING(face);
desc.flags = FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT;
#include FT_CACHE_H
#include FT_CACHE_SMALL_BITMAPS_H
-#define NCF_FILE "/var/tuxbox/config/neutrino.conf"
+#ifndef FB_DEVICE
+#define FB_DEVICE "/dev/fb/0"
+#endif
+#ifndef FB_DEVICE_FALLBACK
+#define FB_DEVICE_FALLBACK "/dev/fb0"
+#endif
+
//rc codes
int get_instance(void);
void put_instance(int pval);
-#ifndef FB_DEVICE
-#define FB_DEVICE "/dev/fb/0"
-#endif
-
int key_count;
unsigned short lastkey;