Skip to content

Commit 2015782

Browse files
committed
Minor fixes
1 parent 82d3ffd commit 2015782

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

SDL/console.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ static bool redraw_prompt(bool force)
346346
else {
347347
printf("%.*s", (int)(left - 1), string);
348348
string += left;
349-
left = 1;
350349
printf(SGR("2") "%c" SGR("0"), *string);
351350
}
352351
printf(CSI("%uG"), (unsigned)(line.position - line.scroll + prompt_length + 1));
@@ -595,6 +594,9 @@ static void no_csi_mainloop(void)
595594

596595
errno = 0;
597596
if (getline(&expression, &size, stdin) <= 0) {
597+
if (expression) {
598+
free(expression);
599+
}
598600
if (!errno) {
599601
continue;
600602
}

SDL/gui.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ void render_texture(void *pixels, void *previous)
5858
SDL_RenderPresent(renderer);
5959
}
6060
else {
61-
static void *_pixels = NULL;
62-
if (pixels) {
63-
_pixels = pixels;
64-
}
6561
glClearColor(0, 0, 0, 1);
6662
glClear(GL_COLOR_BUFFER_BIT);
6763
GB_frame_blending_mode_t mode = configuration.blending_mode;
@@ -76,7 +72,7 @@ void render_texture(void *pixels, void *previous)
7672
mode = GB_is_odd_frame(&gb)? GB_FRAME_BLENDING_MODE_ACCURATE_ODD : GB_FRAME_BLENDING_MODE_ACCURATE_EVEN;
7773
}
7874
}
79-
render_bitmap_with_shader(&shader, _pixels, previous,
75+
render_bitmap_with_shader(&shader, pixels, previous,
8076
GB_get_screen_width(&gb), GB_get_screen_height(&gb),
8177
rect.x, rect.y, rect.w, rect.h,
8278
mode);

0 commit comments

Comments
 (0)