From c56cc3871d3797b9cb620d6b0c4f34cf81eac362 Mon Sep 17 00:00:00 2001 From: clwe Date: Wed, 1 Jul 2020 15:56:07 +0200 Subject: [PATCH] PD: fixes initial display, display pd version --- examples/gain.pd | 9 --------- src/LibPDEngine.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/gain.pd b/examples/gain.pd index 8d3b097..a98f6f1 100644 --- a/examples/gain.pd +++ b/examples/gain.pd @@ -35,9 +35,6 @@ #X obj 383 340 == 0; #X obj 447 342 == 0; #X obj 513 343 == 0; -#X msg 89 622 display \$1 \$2; -#X obj 80 582 pack f f; -#X obj 107 526 t b f; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 0 2 4 0; @@ -71,10 +68,8 @@ #X connect 27 0 28 0; #X connect 28 0 2 1; #X connect 28 0 12 0; -#X connect 28 0 37 0; #X connect 28 1 3 1; #X connect 28 1 13 0; -#X connect 28 1 38 0; #X connect 28 2 4 1; #X connect 28 2 9 0; #X connect 28 3 5 1; @@ -102,7 +97,3 @@ #X connect 33 0 18 1; #X connect 34 0 19 1; #X connect 35 0 20 1; -#X connect 36 0 8 0; -#X connect 37 0 36 0; -#X connect 38 0 37 0; -#X connect 38 1 37 1; diff --git a/src/LibPDEngine.cpp b/src/LibPDEngine.cpp index 4f98972..7d15fc9 100644 --- a/src/LibPDEngine.cpp +++ b/src/LibPDEngine.cpp @@ -138,6 +138,7 @@ struct LibPDEngine : ScriptEngine { // display if(g_display_is_valid){ display(g_utility[1]); + g_display_is_valid = false; } // process samples in libpd _ticks = 1; @@ -296,4 +297,9 @@ void LibPDEngine::sendInitialStates(const ProcessBlock* block){ sendKnob(i, block->knobs[i]); sendSwitch(i, block->knobs[i]); } + std::string version = "pd "+std::to_string(PD_MAJOR_VERSION)+"."+ + std::to_string(PD_MINOR_VERSION)+"." + +std::to_string(PD_BUGFIX_VERSION); + + display(version); } \ No newline at end of file