mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 04:01:53 +02:00
Renamed 'dingux' platform to 'a320'
Dingux being now replaced by OpenDingux, which covers other platforms than the A320, the platform corresponding to the A320 is now named accordingly.
This commit is contained in:
parent
59ece31c00
commit
6629a63871
@ -35,9 +35,9 @@ AC_ARG_ENABLE(platform,
|
|||||||
[GMENU2X_PLATFORM="$enableval"], [GMENU2X_PLATFORM="default"])
|
[GMENU2X_PLATFORM="$enableval"], [GMENU2X_PLATFORM="default"])
|
||||||
|
|
||||||
case "$GMENU2X_PLATFORM" in
|
case "$GMENU2X_PLATFORM" in
|
||||||
dingux)
|
a320)
|
||||||
AC_DEFINE(PLATFORM_DINGUX)
|
AC_DEFINE(PLATFORM_A320)
|
||||||
PLATFORM="dingux"
|
PLATFORM="a320"
|
||||||
SCREEN_RES="320x240"
|
SCREEN_RES="320x240"
|
||||||
;;
|
;;
|
||||||
gcw0)
|
gcw0)
|
||||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
#include <sys/fcntl.h> //for battery
|
#include <sys/fcntl.h> //for battery
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
# define UNLOCK_VT
|
# define UNLOCK_VT
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
# include <linux/vt.h>
|
# include <linux/vt.h>
|
||||||
@ -101,7 +101,7 @@ using namespace fastdelegate;
|
|||||||
|
|
||||||
#ifdef _CARD_ROOT
|
#ifdef _CARD_ROOT
|
||||||
const char *CARD_ROOT = _CARD_ROOT;
|
const char *CARD_ROOT = _CARD_ROOT;
|
||||||
#elif defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#elif defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
const char *CARD_ROOT = "/media/";
|
const char *CARD_ROOT = "/media/";
|
||||||
#else
|
#else
|
||||||
const char *CARD_ROOT = "/card/"; //Note: Add a trailing /!
|
const char *CARD_ROOT = "/card/"; //Note: Add a trailing /!
|
||||||
@ -348,7 +348,7 @@ void GMenu2X::initBG() {
|
|||||||
Surface *sd = Surface::loadImage("imgs/sd.png", confStr["skin"]);
|
Surface *sd = Surface::loadImage("imgs/sd.png", confStr["skin"]);
|
||||||
if (sd) sd->blit(bgmain, 3, bottomBarIconY);
|
if (sd) sd->blit(bgmain, 3, bottomBarIconY);
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
string df = getDiskFree("/boot");
|
string df = getDiskFree("/boot");
|
||||||
#else
|
#else
|
||||||
string df = getDiskFree(CARD_ROOT);
|
string df = getDiskFree(CARD_ROOT);
|
||||||
@ -735,7 +735,7 @@ void GMenu2X::main() {
|
|||||||
s->rectangle( 12,52,296,helpBoxHeight,
|
s->rectangle( 12,52,296,helpBoxHeight,
|
||||||
skinConfColors[COLOR_MESSAGE_BOX_BORDER] );
|
skinConfColors[COLOR_MESSAGE_BOX_BORDER] );
|
||||||
s->write( font, tr["CONTROLS"], 20, 60 );
|
s->write( font, tr["CONTROLS"], 20, 60 );
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
s->write( font, tr["A: Launch link / Confirm action"], 20, 80 );
|
s->write( font, tr["A: Launch link / Confirm action"], 20, 80 );
|
||||||
s->write( font, tr["B: Show this help menu"], 20, 95 );
|
s->write( font, tr["B: Show this help menu"], 20, 95 );
|
||||||
s->write( font, tr["L, R: Change section"], 20, 110 );
|
s->write( font, tr["L, R: Change section"], 20, 110 );
|
||||||
@ -1215,7 +1215,7 @@ void GMenu2X::editLink() {
|
|||||||
sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Screenshots"], tr["Directory of the screenshots for the selector"], &linkSelScreens));
|
sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Screenshots"], tr["Directory of the screenshots for the selector"], &linkSelScreens));
|
||||||
sd.addSetting(new MenuSettingFile(this, ts, tr["Selector Aliases"], tr["File containing a list of aliases for the selector"], &linkSelAliases));
|
sd.addSetting(new MenuSettingFile(this, ts, tr["Selector Aliases"], tr["File containing a list of aliases for the selector"], &linkSelAliases));
|
||||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef()));
|
sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef()));
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Display Console"], tr["Must be enabled for console-based applications"], &menu->selLinkApp()->consoleApp));
|
sd.addSetting(new MenuSettingBool(this, ts, tr["Display Console"], tr["Must be enabled for console-based applications"], &menu->selLinkApp()->consoleApp));
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBOPK
|
#ifdef HAVE_LIBOPK
|
||||||
@ -1431,7 +1431,7 @@ void GMenu2X::scanPath(string path, vector<string> *files) {
|
|||||||
scanPath(filepath, files);
|
scanPath(filepath, files);
|
||||||
if (statRet != -1) {
|
if (statRet != -1) {
|
||||||
ext = filepath.substr(filepath.length()-4,4);
|
ext = filepath.substr(filepath.length()-4,4);
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||||
if (ext==".dge")
|
if (ext==".dge")
|
||||||
#else
|
#else
|
||||||
if (ext==".pxml")
|
if (ext==".pxml")
|
||||||
@ -1452,7 +1452,7 @@ unsigned short GMenu2X::getBatteryLevel() {
|
|||||||
FILE *batteryHandle = NULL,
|
FILE *batteryHandle = NULL,
|
||||||
*usbHandle = NULL;
|
*usbHandle = NULL;
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||||
usbHandle = fopen("/sys/class/power_supply/usb/online", "r");
|
usbHandle = fopen("/sys/class/power_supply/usb/online", "r");
|
||||||
#endif
|
#endif
|
||||||
if (usbHandle) {
|
if (usbHandle) {
|
||||||
@ -1463,7 +1463,7 @@ unsigned short GMenu2X::getBatteryLevel() {
|
|||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||||
batteryHandle = fopen("/sys/class/power_supply/battery/capacity", "r");
|
batteryHandle = fopen("/sys/class/power_supply/battery/capacity", "r");
|
||||||
#endif
|
#endif
|
||||||
if (batteryHandle) {
|
if (batteryHandle) {
|
||||||
@ -1487,7 +1487,7 @@ void GMenu2X::setInputSpeed() {
|
|||||||
|
|
||||||
void GMenu2X::setClock(unsigned mhz) {
|
void GMenu2X::setClock(unsigned mhz) {
|
||||||
mhz = constrain(mhz, cpuFreqMin, confInt["maxClock"]);
|
mhz = constrain(mhz, cpuFreqMin, confInt["maxClock"]);
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||||
jz_cpuspeed(mhz);
|
jz_cpuspeed(mhz);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
#include <linux/vt.h>
|
#include <linux/vt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
|||||||
selectorbrowser = true;
|
selectorbrowser = true;
|
||||||
editable = true;
|
editable = true;
|
||||||
edited = false;
|
edited = false;
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
consoleApp = false;
|
consoleApp = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
param = opk_read_param(pdata, "Terminal");
|
param = opk_read_param(pdata, "Terminal");
|
||||||
if (param)
|
if (param)
|
||||||
consoleApp = !strcmp(param, "true");
|
consoleApp = !strcmp(param, "true");
|
||||||
@ -268,7 +268,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
|||||||
manual = value;
|
manual = value;
|
||||||
} else if (name == "dontleave") {
|
} else if (name == "dontleave") {
|
||||||
if (value=="true") dontleave = true;
|
if (value=="true") dontleave = true;
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
} else if (name == "consoleapp") {
|
} else if (name == "consoleapp") {
|
||||||
if (value == "true") consoleApp = true;
|
if (value == "true") consoleApp = true;
|
||||||
#endif
|
#endif
|
||||||
@ -353,7 +353,7 @@ bool LinkApp::save() {
|
|||||||
if (params!="" ) f << "params=" << params << endl;
|
if (params!="" ) f << "params=" << params << endl;
|
||||||
if (manual!="" ) f << "manual=" << manual << endl;
|
if (manual!="" ) f << "manual=" << manual << endl;
|
||||||
if (dontleave ) f << "dontleave=true" << endl;
|
if (dontleave ) f << "dontleave=true" << endl;
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
if (consoleApp ) f << "consoleapp=true" << endl;
|
if (consoleApp ) f << "consoleapp=true" << endl;
|
||||||
#endif
|
#endif
|
||||||
if (selectorfilter!="" ) f << "selectorfilter=" << selectorfilter << endl;
|
if (selectorfilter!="" ) f << "selectorfilter=" << selectorfilter << endl;
|
||||||
@ -646,7 +646,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
|||||||
} // else, well.. we are no worse off :)
|
} // else, well.. we are no worse off :)
|
||||||
|
|
||||||
if (params!="") command += " " + params;
|
if (params!="") command += " " + params;
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
if (gmenu2x->confInt["outputLogs"] && !consoleApp)
|
if (gmenu2x->confInt["outputLogs"] && !consoleApp)
|
||||||
command += " &> " + cmdclean(gmenu2x->getHome()) + "/log.txt";
|
command += " &> " + cmdclean(gmenu2x->getHome()) + "/log.txt";
|
||||||
#else
|
#else
|
||||||
@ -694,7 +694,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
|||||||
signal(SIGTTOU, SIG_IGN);
|
signal(SIGTTOU, SIG_IGN);
|
||||||
tcsetpgrp(STDOUT_FILENO, pgid);
|
tcsetpgrp(STDOUT_FILENO, pgid);
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
if (consoleApp) {
|
if (consoleApp) {
|
||||||
/* Enable the framebuffer console */
|
/* Enable the framebuffer console */
|
||||||
char c = '1';
|
char c = '1';
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
|
|
||||||
virtual const std::string &searchIcon();
|
virtual const std::string &searchIcon();
|
||||||
|
|
||||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||||
bool consoleApp;
|
bool consoleApp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user