Change Details
| src/gmenu2x.cpp |
| 1705 | 1705 | sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Screenshots"], tr["Directory of the screenshots for the selector"], &linkSelScreens)); |
| 1706 | 1706 | sd.addSetting(new MenuSettingFile(this, ts, tr["Selector Aliases"], tr["File containing a list of aliases for the selector"], &linkSelAliases)); |
| 1707 | 1707 | sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef())); |
| 1708 | #ifdef PLATFORM_DINGUX |
| 1709 | sd.addSetting(new MenuSettingBool(this, ts, tr["Display Console"], tr["Must be enabled for console-based applications"], &menu->selLinkApp()->consoleApp)); |
| 1710 | #endif |
| 1708 | 1711 | |
| 1709 | 1712 | if (sd.exec() && sd.edited()) { |
| 1710 | 1713 | ledOn(); |
| src/linkapp.cpp |
| 32 | 32 | #include <sys/ioctl.h> |
| 33 | 33 | #include <signal.h> |
| 34 | 34 | #include <unistd.h> |
| 35 | #include <fcntl.h> |
| 35 | 36 | |
| 36 | 37 | #include <fstream> |
| 37 | 38 | #include <sstream> |
| ... | ... | |
| 53 | 54 | icon = iconPath = ""; |
| 54 | 55 | selectorbrowser = false; |
| 55 | 56 | useRamTimings = false; |
| 57 | #ifdef PLATFORM_DINGUX |
| 58 | consoleApp = false; |
| 59 | #endif |
| 56 | 60 | |
| 57 | 61 | string line; |
| 58 | 62 | ifstream infile (linkfile, ios_base::in); |
| ... | ... | |
| 78 | 82 | manual = value; |
| 79 | 83 | } else if (name == "dontleave") { |
| 80 | 84 | if (value=="true") dontleave = true; |
| 85 | #ifdef PLATFORM_DINGUX |
| 86 | } else if (name == "consoleapp") { |
| 87 | if (value == "true") consoleApp = true; |
| 88 | #endif |
| 81 | 89 | } else if (name == "clock") { |
| 82 | 90 | setClock( atoi(value.c_str()) ); |
| 83 | 91 | } else if (name == "selectordir") { |
| ... | ... | |
| 167 | 175 | if (selectorscreens!="") f << "selectorscreens=" << selectorscreens << endl; |
| 168 | 176 | if (aliasfile!="" ) f << "selectoraliases=" << aliasfile << endl; |
| 169 | 177 | if (dontleave ) f << "dontleave=true" << endl; |
| 178 | #ifdef PLATFORM_DINGUX |
| 179 | if (consoleApp ) f << "consoleapp=true" << endl; |
| 180 | #endif |
| 170 | 181 | f.close(); |
| 171 | 182 | sync(); |
| 172 | 183 | return true; |
| ... | ... | |
| 429 | 440 | signal(SIGTTOU, SIG_IGN); |
| 430 | 441 | tcsetpgrp(STDOUT_FILENO, pgid); |
| 431 | 442 | |
| 443 | #ifdef PLATFORM_DINGUX |
| 444 | if (consoleApp) { |
| 445 | /* Enable the framebuffer console */ |
| 446 | char c = '1'; |
| 447 | int fd = open("/sys/devices/virtual/vtconsole/vtcon1/bind", O_WRONLY); |
| 448 | if (fd < 0) { |
| 449 | WARNING("Unable to open fbcon handle\n"); |
| 450 | } else { |
| 451 | write(fd, &c, 1); |
| 452 | close(fd); |
| 453 | } |
| 454 | } |
| 455 | #endif |
| 456 | |
| 432 | 457 | execlp("/bin/sh","/bin/sh", "-c", command.c_str(), NULL); |
| 433 | 458 | //if execution continues then something went wrong and as we already called SDL_Quit we cannot continue |
| 434 | 459 | //try relaunching gmenu2x |
| src/linkapp.h |
| 58 | 58 | const char* linkfile); |
| 59 | 59 | virtual const std::string &searchIcon(); |
| 60 | 60 | |
| 61 | #ifdef PLATFORM_DINGUX |
| 62 | bool consoleApp; |
| 63 | #endif |
| 64 | |
| 61 | 65 | const std::string &getExec(); |
| 62 | 66 | void setExec(const std::string &exec); |
| 63 | 67 | const std::string &getParams(); |
Download the corresponding diff file