infoclock: add hack to control logomask plugin

Origin commit data
------------------
Branch: ni/coolstream
Commit: 2610d43a0c
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-05-05 (Sat, 05 May 2018)

Origin message was:
------------------
- infoclock: add hack to control logomask plugin

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2018-05-05 23:29:59 +02:00
parent 3630378597
commit 82a6b97831

View File

@@ -36,6 +36,9 @@
#include <gui/infoclock.h>
#include <gui/timeosd.h>
#include <unistd.h>
#include <system/helpers.h>
extern CTimeOSD *FileTimeOSD;
CInfoClock::CInfoClock():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON)
@@ -145,6 +148,22 @@ bool CInfoClock::enableInfoClock(bool enable)
}
}
// badass hack to control logomask plugin
if (getpidof("logomask"))
{
const char *logomask_pause = "/tmp/.logomask_pause";
if (enable)
{
if (access(logomask_pause, F_OK) == 0)
unlink(logomask_pause);
}
else
{
if (FILE *f = fopen(logomask_pause, "w"))
fclose(f);
}
}
return ret;
}