From d4700cb90a5e7a64c29dd27d90ea5ab8862f34a6 Mon Sep 17 00:00:00 2001 From: Daniel Monteiro Date: Thu, 20 Jun 2024 22:33:50 +0100 Subject: [PATCH] fix: displaying focused item name on screen --- ee_frontend/base3d/src/Renderer.c | 2 +- ee_frontend/base3d/src/ee/Renderer.c | 2 +- gl_frontend/GL1Common/Renderer.c | 2 +- mx_frontend/base3d/src/Renderer.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ee_frontend/base3d/src/Renderer.c b/ee_frontend/base3d/src/Renderer.c index 8f15594c5..b5d3d8cbc 100644 --- a/ee_frontend/base3d/src/Renderer.c +++ b/ee_frontend/base3d/src/Renderer.c @@ -919,7 +919,7 @@ void render(const long ms) { size_t len = strlen(focusItemName); int lines = 1 + (len / 27); fillRect(0, YRES - (8 * lines), XRES, lines * 8, 0, 1); - drawTextAtWithMarginWithFiltering(1, 26 - lines, XRES, focusItemName, 255, ' '); + drawTextAtWithMarginWithFiltering(1, (YRES / 8) - lines, XRES, focusItemName, 255, ' '); } diff --git a/ee_frontend/base3d/src/ee/Renderer.c b/ee_frontend/base3d/src/ee/Renderer.c index 107ace434..9f96b5e29 100644 --- a/ee_frontend/base3d/src/ee/Renderer.c +++ b/ee_frontend/base3d/src/ee/Renderer.c @@ -1045,7 +1045,7 @@ void render(const long ms) { size_t len = strlen(focusItemName); int lines = 1 + (len / 27); fillRect(0, YRES - (8 * lines), XRES, lines * 8, 0, 1); - drawTextAtWithMarginWithFiltering(1, 26 - lines, XRES, focusItemName, 255, ' '); + drawTextAtWithMarginWithFiltering(1, (YRES / 8) - lines, XRES, focusItemName, 255, ' '); } diff --git a/gl_frontend/GL1Common/Renderer.c b/gl_frontend/GL1Common/Renderer.c index d639595e6..e300555fa 100644 --- a/gl_frontend/GL1Common/Renderer.c +++ b/gl_frontend/GL1Common/Renderer.c @@ -1003,7 +1003,7 @@ void render(const long ms) { size_t len = strlen(focusItemName); int lines = 1 + (len / 27); fillRect(0, YRES - (8 * lines), XRES, lines * 8, getPaletteEntry(0xFF000000), TRUE); - drawTextAtWithMarginWithFiltering(1, 26 - lines, XRES, focusItemName, getPaletteEntry(0xFFFFFFFF), ' '); + drawTextAtWithMarginWithFiltering(1, (YRES / 8) - lines, XRES, focusItemName, getPaletteEntry(0xFFFFFFFF), ' '); } diff --git a/mx_frontend/base3d/src/Renderer.c b/mx_frontend/base3d/src/Renderer.c index 4d046f74c..4b4fb0567 100644 --- a/mx_frontend/base3d/src/Renderer.c +++ b/mx_frontend/base3d/src/Renderer.c @@ -853,7 +853,7 @@ void render(const long ms) { size_t len = strlen(focusItemName); int lines = 1 + (len / 27); fillRect(0, YRES - (8 * lines), XRES, lines * 8, 0, 1); - drawTextAtWithMarginWithFiltering(1, 26 - lines, XRES, focusItemName, 255, ' '); + drawTextAtWithMarginWithFiltering(1, (YRES / 8) - lines, XRES, focusItemName, 255, ' '); }