use $feature() to enable debug features
This commit is contained in:
parent
8cecb57d93
commit
167676f478
@ -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,
|
||||
|
@ -3,7 +3,7 @@
|
||||
"warnings": ["no-unused"],
|
||||
"dependency-search-paths": ["lib", "lib/vendor/libraries"],
|
||||
"dependencies": ["sdl3", "ugui"],
|
||||
"features": [],
|
||||
"features": ["DEBUG_POINTER"],
|
||||
"authors": ["Alessandro Mauri <ale@shitposting.expert>"],
|
||||
"version": "0.1.0",
|
||||
"sources": ["src/**"],
|
||||
@ -14,7 +14,6 @@
|
||||
"type": "executable"
|
||||
}
|
||||
},
|
||||
"cpu": "native",
|
||||
"opt": "O0",
|
||||
"debug-info": "full"
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user