summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-01-17 22:41:01 +0100
committerRobin Gareus <robin@gareus.org>2020-01-17 22:41:01 +0100
commit33f71677ebf9ae73d01c6bd8837b4acc94f9eeeb (patch)
tree2b73f5bf48386da3efb6106dde583139f97fdd40
parent0ad9c3de1a2a7870e3ce95fa96d0ff96253c52d0 (diff)
Make it possible to use reasonable-synth in production
This allows to disable the xmass easter-egg for those who don't celebrate x-mas.
-rw-r--r--libs/plugins/reasonablesynth.lv2/lv2.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libs/plugins/reasonablesynth.lv2/lv2.c b/libs/plugins/reasonablesynth.lv2/lv2.c
index bdb3e343ac..03d4b8646d 100644
--- a/libs/plugins/reasonablesynth.lv2/lv2.c
+++ b/libs/plugins/reasonablesynth.lv2/lv2.c
@@ -100,13 +100,15 @@ instantiate (const LV2_Descriptor* descriptor,
synth_init(self->synth, rate);
#ifndef PLATFORM_WINDOWS // easter egg is for sane platforms with native support for localtime_r only
- struct tm date;
- time_t now;
- time(&now);
- localtime_r(&now, &date);
- if (getenv("ITSXMAS") || (date.tm_mon == 11 /*dec*/ && date.tm_mday == 25)) {
- printf("reasonable synth.lv2 says: happy holidays!\n");
- self->xmas = true;
+ if (!getenv("HEATHEN")) {
+ struct tm date;
+ time_t now;
+ time(&now);
+ localtime_r(&now, &date);
+ if (getenv("ITSXMAS") || (date.tm_mon == 11 /*dec*/ && date.tm_mday == 25)) {
+ printf("reasonable synth.lv2 says: happy holidays!\n");
+ self->xmas = true;
+ }
}
#endif