From c4b0f5d9cd97572c1388b7e94847054820c7b6fe Mon Sep 17 00:00:00 2001 From: redthing1 Date: Mon, 15 Jul 2024 19:19:04 -0700 Subject: [PATCH] debugger: fix render bounds --- source/re/ng/diag/debugger.d | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/source/re/ng/diag/debugger.d b/source/re/ng/diag/debugger.d index 3934ca65..8fc8f6eb 100644 --- a/source/re/ng/diag/debugger.d +++ b/source/re/ng/diag/debugger.d @@ -34,11 +34,14 @@ debug class Debugger { inspector = new Inspector(); console = new Console(); if (!Core.headless) { - ui_bounds = Rectangle(0, 0, Core.window.render_width, Core.window.render_height); - _render_target = RenderExt.create_render_target(cast(int) ui_bounds.width, cast(int) ui_bounds - .height); - Core.log.info(format("debugger info: ui_bounds=%s, resolution=%s", - ui_bounds, Core.default_resolution)); + ui_bounds = Rectangle(0, 0, Core.window.screen_width, Core.window.screen_height); + _render_target = RenderExt.create_render_target( + cast(int) ui_bounds.width, cast(int) ui_bounds.height + ); + Core.log.info( + format("debugger info: ui_bounds=%s, resolution=%s", + ui_bounds, Core.default_resolution) + ); } } @@ -60,11 +63,6 @@ debug class Debugger { } public void render() { - if (!inspector.open && !console.open) { - // nothing to render - return; - } - raylib.BeginTextureMode(_render_target); raylib.ClearBackground(Colors.BLANK); @@ -77,7 +75,7 @@ debug class Debugger { // draw render target RenderExt.draw_render_target(_render_target, - Rectangle(0, 0, Core.window.render_width, Core.window.render_height), + Rectangle(0, 0, Core.window.screen_width, Core.window.screen_height), _render_col ); }