diff --git a/lib/ugui.c3l/src/core.c3 b/lib/ugui.c3l/src/core.c3 index c5210ee..6e45928 100644 --- a/lib/ugui.c3l/src/core.c3 +++ b/lib/ugui.c3l/src/core.c3 @@ -268,8 +268,6 @@ fn void? Ctx.frame_begin(&ctx) // TODO: add a background color taken from a theme or config } -const int DEBUG = 1; - fn void? Ctx.frame_end(&ctx) { // FIXME: this is not guaranteed to be root. the user might forget to close a div or some other element @@ -300,7 +298,7 @@ fn void? Ctx.frame_end(&ctx) } // debug -$if DEBUG == 1: +$if $feature(DEBUG_POINTER): // draw mouse position Cmd cmd = { .type = CMD_RECT, diff --git a/project.json b/project.json index 5f672d7..bf403a4 100644 --- a/project.json +++ b/project.json @@ -3,7 +3,7 @@ "warnings": ["no-unused"], "dependency-search-paths": ["lib", "lib/vendor/libraries"], "dependencies": ["sdl3", "ugui"], - "features": [], + "features": ["DEBUG_POINTER"], "authors": ["Alessandro Mauri "], "version": "0.1.0", "sources": ["src/**"], @@ -14,7 +14,6 @@ "type": "executable" } }, - "cpu": "native", "opt": "O0", "debug-info": "full" } diff --git a/src/renderer.c3 b/src/renderer.c3 index 81be051..189517c 100644 --- a/src/renderer.c3 +++ b/src/renderer.c3 @@ -36,7 +36,6 @@ import ugui; // CONSTANTS // // ============================================================================================== // -const int DEBUG = 1; const bool CYCLE = true; const int MAX_QUAD_BATCH = 2048; @@ -147,7 +146,7 @@ struct Renderer { fn void Renderer.init(&self, ZString title, uint width, uint height, bool vsync) { // set wayland hint automagically -$if DEBUG == 0: +$if $feature(RENDER_DEBUG) == false && $feature(USE_WAYLAND) == true: bool has_wayland = false; for (int i = 0; i < sdl::get_num_video_drivers(); i++) { ZString driver = sdl::get_video_driver(i);