2
0
Эх сурвалжийг харах

Remove MUSIALIZER_ACT_ON_PRESS

The experiment has concluded and I made an executive decision to not
proceed with this approach.
rexim 6 сар өмнө
parent
commit
abc3aba749

+ 0 - 7
src/plug.c

@@ -206,9 +206,7 @@ typedef struct {
     float out_smooth[FFT_SIZE];
     float out_smear[FFT_SIZE];
 
-#ifndef MUSIALIZER_ACT_ON_PRESS
     uint64_t active_button_id;
-#endif // MUSIALIZER_ACT_ON_PRESS
 
     Popup_Tray pt;
 
@@ -640,7 +638,6 @@ static int button_with_id(uint64_t id, Rectangle boundary)
     Vector2 mouse = GetMousePosition();
     int hoverover = CheckCollisionPointRec(mouse, boundary);
 
-#ifndef MUSIALIZER_ACT_ON_PRESS
     int clicked = 0;
     if (p->active_button_id == 0) {
         if (hoverover && IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) {
@@ -652,10 +649,6 @@ static int button_with_id(uint64_t id, Rectangle boundary)
             if (hoverover) clicked = 1;
         }
     }
-#else
-    (void) id;
-    int clicked = hoverover && IsMouseButtonPressed(MOUSE_BUTTON_LEFT);
-#endif // MUSIALIZER_ACT_ON_PRESS
 
     return (clicked<<1) | hoverover;
 }

+ 0 - 5
src_build/configurer.c

@@ -71,11 +71,6 @@ static Feature_Flag feature_flags[] = {
         .macro = "MUSIALIZER_MICROPHONE",
         .description = "Unfinished feature that enables capturing sound from the mic."
     },
-    {
-        .display = "Act on Press",
-        .macro = "MUSIALIZER_ACT_ON_PRESS",
-        .description = "Activate UI buttons on Press instead of Release just as John Carmack explained https://twitter.com/ID_AA_Carmack/status/1787850053912064005"
-    },
 };
 
 #define genf(out, ...) \

+ 5 - 0
src_build/nob_stage2.c

@@ -5,6 +5,11 @@
 #include "../build/config.h"
 #include "./configurer.c"
 
+// Removed feature flags
+#ifdef MUSIALIZER_ACT_ON_PRESS
+#error "MUSIALIZER_ACT_ON_PRESS no longer exists. Please remove it from your build/config.h"
+#endif // MUSIALIZER_ACT_ON_PRESS
+
 static const char *raylib_modules[] = {
     "rcore",
     "raudio",