File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ project "rive_viewer"
5959 }
6060
6161 buildoptions {" -Wall" , " -fno-exceptions" , " -fno-rtti" }
62+ defines { " RIVE_EXPERIMENTS" }
6263
6364 filter " configurations:debug"
6465 buildoptions {" -g" }
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ std::vector<std::string> stateMachineNames;
6969
7070constexpr int REQUEST_DEFAULT_SCENE = -1 ;
7171
72+ #ifdef RIVE_EXPERIMENTS
7273#include < time.h>
7374double GetSecondsToday () {
7475 time_t m_time;
@@ -90,6 +91,7 @@ double GetSecondsToday() {
9091// printf("%g %g %g\n", secs, secs/60, secs/60/60);
9192 return secs;
9293}
94+ #endif
9395
9496// We hold onto the file's bytes for the lifetime of the file, in case we want
9597// to change animations or state-machines, we just rebuild the rive::File from
@@ -325,10 +327,12 @@ int main() {
325327 canvas->drawPaint (paint);
326328
327329 if (currentScene) {
330+ #ifdef RIVE_EXPERIMENTS
328331 // See if we can "set the time" e.g. clock statemachine
329332 if (auto num = currentScene->getNumber (" isTime" )) {
330333 num->value (GetSecondsToday ()/60 /60 );
331334 }
335+ #endif
332336
333337 currentScene->advanceAndApply (elapsed);
334338
You can’t perform that action at this time.
0 commit comments