SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 226825bda4bd344b6ccc7ee4794c8d707d25c106 parent 927b7493e5af950666f897578d9b8fd2d7b4425f Author: Lior Halphon <LIJI32@gmail.com> Date: Sat, 6 Jan 2024 17:46:12 +0200 Fix menu layout in bordered/SGB mode, in the SDL port Diffstat:
| M | SDL/gui.c | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SDL/gui.c b/SDL/gui.c @@ -238,12 +238,12 @@ enum style { static void draw_styled_text(uint32_t *buffer, unsigned width, unsigned height, unsigned y, const char *string, uint32_t color, uint32_t border, enum style style) { - unsigned x = GLYPH_WIDTH * 2; + unsigned x = GLYPH_WIDTH * 2 + (width - 160) / 2; if (style == STYLE_CENTER || style == STYLE_ARROWS) { x = width / 2 - (unsigned) strlen(string) * GLYPH_WIDTH / 2; } else if (style == STYLE_LEFT) { - x = 6; + x = 6 + (width - 160) / 2; } draw_text(buffer, width, height, x, y, string, color, border, false);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.