X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=main%2Fenigma.cpp;h=98175c49425f927a358a41f8d1471f04b96ab328;hb=bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b;hp=307edd5a9fd35fb9f0fbe322b7574a1582e2c4ed;hpb=da9872eac33f4f8a085261c3cbdcbf4c8d664f65;p=vuplus_dvbapp diff --git a/main/enigma.cpp b/main/enigma.cpp index 307edd5..98175c4 100644 --- a/main/enigma.cpp +++ b/main/enigma.cpp @@ -1,5 +1,8 @@ -#include #include +#include +#include +#include +#include #include #include @@ -245,7 +248,7 @@ int main(int argc, char **argv) if (exit_code == 5) /* python crash */ { eDebug("(exit code 5)"); - bsodFatal(); + bsodFatal(0); } dsk.paint(); @@ -277,6 +280,24 @@ void runMainloop() void quitMainloop(int exitCode) { + FILE *f = fopen("/proc/stb/fp/was_timer_wakeup", "w"); + if (f) + { + fprintf(f, "%d", 0); + fclose(f); + } + else + { + int fd = open("/dev/dbox/fp0", O_WRONLY); + if (fd >= 0) + { + if (ioctl(fd, 10 /*FP_CLEAR_WAKEUP_TIMER*/) < 0) + eDebug("FP_CLEAR_WAKEUP_TIMER failed (%m)"); + close(fd); + } + else + eDebug("open /dev/dbox/fp0 for wakeup timer clear failed!(%m)"); + } exit_code = exitCode; eApp->quit(0); }