Skip to content

Commit 70954e6

Browse files
committed
Bugfix tglutil_read.
1 parent 96870f0 commit 70954e6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

termgl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ TGL_SSIZE_T tglutil_read(char *const buf, const size_t count, TGLMouseEvent *con
12511251
.x = buf[rd + 4] - 32,
12521252
.y = buf[rd + 5] - 32,
12531253
};
1254-
rd += 6;
1254+
rd += 5;
12551255
continue;
12561256
}
12571257
buf[wr++] = buf[rd];

termgl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ int tgl_flush(TGL *tgl);
208208
* @param buffers: bitwise combination of buffers:
209209
* TGL_FRAME_BUFFER - frame buffer
210210
* TGL_Z_BUFFER - depth buffer
211+
* TGL_OUTPUT_BUFFER - output buffer
211212
*/
212213
void tgl_clear(TGL *tgl, uint8_t buffers);
213214

@@ -223,7 +224,7 @@ void tgl_clear_screen(void);
223224
* TGL_DOUBLE_WIDTH - display characters at double their standard widths (Limited support from terminal emulators. Should work on Windows Terminal, XTerm, and Konsole)
224225
* TGL_DOUBLE_CHARS - square pixels by printing 2 characters per pixel
225226
* TGL_CULL_FACE - (3D ONLY) cull specified triangle faces
226-
* TGL_OUTPUT_BUFFER - output buffer allowing for just one print to flush. Mush faster on most terminals, but requires a few hundred kilobytes of memory
227+
* TGL_OUTPUT_BUFFER - output buffer allowing for just one print to flush. Much faster on most terminals, but requires a few hundred kilobytes of memory
227228
* TGL_PROGRESSIVE - Over-write previous frame. Eliminates strobing but requires call to tgl_clear_screen before drawing smaller image and after resizing terminal if terminal size was smaller than frame size
228229
* @return 0 on success, -1 on failure
229230
* On failure, errno is set to value specified by: https://www.man7.org/linux/man-pages/man3/malloc.3.html#ERRORS

0 commit comments

Comments
 (0)