ifdef RIVE_EXPERIMENTS
diff --git a/skia/viewer/build/premake5.lua b/skia/viewer/build/premake5.lua
index c2d5b58..a91218e 100644
--- a/skia/viewer/build/premake5.lua
+++ b/skia/viewer/build/premake5.lua
@@ -59,6 +59,7 @@
}
buildoptions {"-Wall", "-fno-exceptions", "-fno-rtti"}
+ defines { "RIVE_EXPERIMENTS" }
filter "configurations:debug"
buildoptions {"-g"}
diff --git a/skia/viewer/src/main.cpp b/skia/viewer/src/main.cpp
index 8c37915..1fb5004 100644
--- a/skia/viewer/src/main.cpp
+++ b/skia/viewer/src/main.cpp
@@ -69,6 +69,7 @@
constexpr int REQUEST_DEFAULT_SCENE = -1;
+#ifdef RIVE_EXPERIMENTS
#include <time.h>
double GetSecondsToday() {
time_t m_time;
@@ -90,6 +91,7 @@
// printf("%g %g %g\n", secs, secs/60, secs/60/60);
return secs;
}
+#endif
// We hold onto the file's bytes for the lifetime of the file, in case we want
// to change animations or state-machines, we just rebuild the rive::File from
@@ -325,10 +327,12 @@
canvas->drawPaint(paint);
if (currentScene) {
+#ifdef RIVE_EXPERIMENTS
// See if we can "set the time" e.g. clock statemachine
if (auto num = currentScene->getNumber("isTime")) {
num->value(GetSecondsToday()/60/60);
}
+#endif
currentScene->advanceAndApply(elapsed);