SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 20157823941a81479fea99cdd8de3de02929c6a8 parent 82d3ffdd9fff2111cb063a6bb4282f980943bbcf Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 14 Nov 2025 23:21:15 +0200 Minor fixes Diffstat:
| M | SDL/console.c | 4 | +++- |
| M | SDL/gui.c | 6 | +----- |
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/SDL/console.c b/SDL/console.c @@ -346,7 +346,6 @@ static bool redraw_prompt(bool force) else { printf("%.*s", (int)(left - 1), string); string += left; - left = 1; printf(SGR("2") "%c" SGR("0"), *string); } printf(CSI("%uG"), (unsigned)(line.position - line.scroll + prompt_length + 1)); @@ -595,6 +594,9 @@ static void no_csi_mainloop(void) errno = 0; if (getline(&expression, &size, stdin) <= 0) { + if (expression) { + free(expression); + } if (!errno) { continue; } diff --git a/SDL/gui.c b/SDL/gui.c @@ -58,10 +58,6 @@ void render_texture(void *pixels, void *previous) SDL_RenderPresent(renderer); } else { - static void *_pixels = NULL; - if (pixels) { - _pixels = pixels; - } glClearColor(0, 0, 0, 1); glClear(GL_COLOR_BUFFER_BIT); GB_frame_blending_mode_t mode = configuration.blending_mode; @@ -76,7 +72,7 @@ void render_texture(void *pixels, void *previous) mode = GB_is_odd_frame(&gb)? GB_FRAME_BLENDING_MODE_ACCURATE_ODD : GB_FRAME_BLENDING_MODE_ACCURATE_EVEN; } } - render_bitmap_with_shader(&shader, _pixels, previous, + render_bitmap_with_shader(&shader, pixels, previous, GB_get_screen_width(&gb), GB_get_screen_height(&gb), rect.x, rect.y, rect.w, rect.h, mode);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.