aboutsummaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
authorRiley Beckett <rbeckettvt@gmail.com>2025-10-26 19:55:26 -0400
committerRiley Beckett <rbeckettvt@gmail.com>2025-10-26 19:55:26 -0400
commit500cd948a40a9ad2ee8e123254d66259c46464d6 (patch)
tree8a0d1a8364fbf11d02e7df40ceb4b8081644e903 /graphics.c
parent8003084ccf17b26e932b565cfc0bb30302af3dd7 (diff)
refactor keybinds
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics.c b/graphics.c
index f462402..ba841dd 100644
--- a/graphics.c
+++ b/graphics.c
@@ -203,7 +203,7 @@ void render_frame(client_state *state) {
glUniform4f(state->b_color_uniform, cursor_color.r,cursor_color.g,cursor_color.b,cursor_color.a);
glUniform2f(state->b_screen_size_uniform, state->width, state->height);
glUniform2f(state->b_start_uniform, atlas_get_strwidth_len(state, state->input_buffer, state->cursor_index) + state->horizontal_spacing / 2.0f, input_y);
- glUniform2f(state->b_size_uniform, state->cursor_index == array_size(state->input_buffer) ? state->atlas.metrics['M'].bitmap_width : state->atlas.metrics[(int)state->input_buffer[state->cursor_index]].bitmap_width, state->line_height);
+ glUniform2f(state->b_size_uniform, state->cursor_index == array_size(state->input_buffer) ? state->atlas.metrics['M'].bitmap_width : state->atlas.metrics[(int)state->input_buffer[state->cursor_index]].advance_x, state->line_height);
glDrawArrays(GL_TRIANGLES, 0, 6);
float start;