From 1016d65d4b5bf7cbd05bba4cf79dc2ce172c9fad Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 15:47:33 +0100 Subject: opt: Guard debug/seek features with STRIP_ALL Ensures that code related to the --seek command line option (simulation loops, silent audio rendering) is completely compiled out when the DEMO_STRIP_ALL build option is enabled, preserving the 64k size constraint. --- src/gpu/gpu.cc | 2 ++ src/gpu/gpu.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/gpu') diff --git a/src/gpu/gpu.cc b/src/gpu/gpu.cc index e68b84d..d119e60 100644 --- a/src/gpu/gpu.cc +++ b/src/gpu/gpu.cc @@ -425,9 +425,11 @@ void gpu_draw(float audio_peak, float aspect_ratio, float time, float beat) { g_main_sequence.render_frame(time, beat, audio_peak, aspect_ratio, g_surface); } +#ifndef STRIP_ALL void gpu_simulate_until(float time) { g_main_sequence.simulate_until(time, 1.0f / 60.0f); } +#endif void gpu_shutdown() { g_main_sequence.shutdown(); diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h index 1d79781..b0b08c9 100644 --- a/src/gpu/gpu.h +++ b/src/gpu/gpu.h @@ -33,7 +33,9 @@ struct RenderPass { void gpu_init(GLFWwindow *window); void gpu_draw(float audio_peak, float aspect_ratio, float time, float beat); +#ifndef STRIP_ALL void gpu_simulate_until(float time); +#endif void gpu_shutdown(); // Helper functions (exposed for internal/future use) -- cgit v1.2.3