almostEric / FrozenWasteland

Plugins for VCV Rack
Other
91 stars 18 forks source link

Build failure on macOS platform #107

Closed cschol closed 2 years ago

cschol commented 2 years ago
src/QuadAlgorithmicRhythm.cpp:2808:3: error: use of undeclared identifier 'modsKeys'
                modsKeys = APP->window->getMods();
                ^
3 warnings and 1 error generated.
make[2]: *** [/home/build/rack-plugin-toolchain/Rack-SDK-mac/compile.mk:72: build/src/QuadAlgorithmicRhythm.cpp.o] Error 1
almostEric commented 2 years ago

Huh. Builds fine here but ok

Sent from my iPhone

On 24 Apr 2022, at 20:14, cschol @.***> wrote:

 src/QuadAlgorithmicRhythm.cpp:2808:3: error: use of undeclared identifier 'modsKeys' modsKeys = APP->window->getMods(); ^ 3 warnings and 1 error generated. make[2]: *** [/home/build/rack-plugin-toolchain/Rack-SDK-mac/compile.mk:72: build/src/QuadAlgorithmicRhythm.cpp.o] Error 1 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

cschol commented 2 years ago

Correction:

@@ -2805,7 +2805,9 @@ struct QuadAlgorithmicRhythmWidget : ModuleWidget {
        }       

        void step() override {
-               modsKeys = APP->window->getMods();
+        if (module_) {
+            module_->modsKeys = APP->window->getMods();
+        }
                step();
        }
cschol commented 2 years ago

BUT...that additional step() call hangs Rack's module browser on my Linux system.

almostEric commented 2 years ago

ok new commitHash: 9e58b760ad8ac542fd2e6d6de04e8dd872dbea61

cschol commented 2 years ago

Check out that additional step() call in the code right after the if statement. That causes a hang in the module browser on my system.

almostEric commented 2 years ago

That seems very odd - since I am overriding the step function, I need continue the call

cschol commented 2 years ago

You are causing an infinite loop with that call.

@@ -2808,7 +2808,7 @@ struct QuadAlgorithmicRhythmWidget : ModuleWidget {
                if(module_) {
                        module_->modsKeys = APP->window->getMods();
                }
-               step();
+        ModuleWidget::step();
        }

This is the correct call. Thanks to @AndrewBelt for helping.

almostEric commented 2 years ago

commitHash: 26639d3b5c9d9bdcabc0ce1f9d74d624fa8a04e3

hopefully last one :)

cschol commented 2 years ago

All good.