From e9beeee7beda25c7e5d12a3afd4aca6f5a3ec7a1 Mon Sep 17 00:00:00 2001 From: eros71-dev <16540103+eros71-dev@users.noreply.github.com> Date: Fri, 24 Nov 2023 21:13:28 +0100 Subject: [PATCH] All good now! Also removed an unused var. --- src/pc/djui/djui_gfx.c | 28 +++++++++++++-------------- src/pc/djui/djui_panel_menu_options.c | 2 -- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/pc/djui/djui_gfx.c b/src/pc/djui/djui_gfx.c index 4023492f..ed4f60e9 100644 --- a/src/pc/djui/djui_gfx.c +++ b/src/pc/djui/djui_gfx.c @@ -30,8 +30,8 @@ void djui_gfx_displaylist_end(void) { static const Vtx vertex_djui_simple_rect[] = { {{{ 0, -1, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, {{{ 1, -1, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, - {{{ 1, 0, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, - {{{ 0, 0, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, + {{{ 1, 0, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, + {{{ 0, 0, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, }; const Gfx dl_djui_simple_rect[] = { @@ -58,10 +58,10 @@ f32 djui_gfx_get_scale(void) { ///////////////////////////////////////////// static const Vtx vertex_djui_image[] = { - {{{ 0, -1, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, + {{{ 0, -1, 0 }, 0, { 0, 2048 }, { 0xff, 0xff, 0xff, 0xff }}}, {{{ 1, -1, 0 }, 0, { 2048, 2048 }, { 0xff, 0xff, 0xff, 0xff }}}, - {{{ 1, 0, 0 }, 0, { 2048, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, - {{{ 0, 0, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, + {{{ 1, 0, 0 }, 0, { 2048, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, + {{{ 0, 0, 0 }, 0, { 0, 0 }, { 0xff, 0xff, 0xff, 0xff }}}, }; const Gfx dl_djui_image[] = { @@ -85,14 +85,14 @@ static u8 djui_gfx_power_of_two(u32 value) { case 2: return 1; case 4: return 2; case 8: return 3; - case 16: return 4; - case 32: return 5; - case 64: return 6; - case 128: return 7; - case 256: return 8; - case 512: return 9; - case 1024: return 10; - default: return 11; + case 16: return 4; + case 32: return 5; + case 64: return 6; + case 128: return 7; + case 256: return 8; + case 512: return 9; + case 1024: return 10; + default: return 11; } } @@ -167,7 +167,7 @@ void djui_gfx_size_translate(f32* size) { u32 windowWidth, windowHeight; wm_api->get_dimensions(&windowWidth, &windowHeight); - *size = *size * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale() + *size = *size * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale(); } bool djui_gfx_add_clipping_specific(struct DjuiBase* base, f32 dX, f32 dY, f32 dW, f32 dH) { diff --git a/src/pc/djui/djui_panel_menu_options.c b/src/pc/djui/djui_panel_menu_options.c index 1bcaa324..550d77b7 100644 --- a/src/pc/djui/djui_panel_menu_options.c +++ b/src/pc/djui/djui_panel_menu_options.c @@ -7,8 +7,6 @@ #include "src/pc/configfile.h" #include "src/game/level_update.h" -static bool sChangedScale = false; - static struct DjuiSelectionbox* sLevelBox = NULL; static void djui_panel_random_menu(UNUSED struct DjuiBase* caller) {