aboutsummaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
authorRiley Beckett <rbeckettvt@gmail.com>2025-10-27 16:30:01 -0400
committerRiley Beckett <rbeckettvt@gmail.com>2025-10-27 16:30:01 -0400
commit2033b55f91876c8fc0d4cd3cdf9c67972ad5490c (patch)
tree70673c7f890dd0e7ffa6fa8b9922d627424d1bdb /graphics.c
parentc99280755915e8b0a997cffc671708a5d8bfa1cf (diff)
add -P password flag
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/graphics.c b/graphics.c
index 9f66702..d5a9b91 100644
--- a/graphics.c
+++ b/graphics.c
@@ -246,6 +246,12 @@ typedef struct {
void init_text_buffer(client_state* state, text_buffer_t* buffer, char* text, size_t text_len) {
buffer->pixel_len = 0;
+ char buf[text_len];
+ if (state->password && text == state->input_buffer) {
+ memset(buf, '*', text_len);
+ text = buf;
+ }
+
// generate openg bullshit
glGenVertexArrays(1, &buffer->vao);
glBindVertexArray(buffer->vao);