diff options
Diffstat (limited to 'examples/ui.c')
-rw-r--r-- | examples/ui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/ui.c b/examples/ui.c index c10a9c6..022a463 100644 --- a/examples/ui.c +++ b/examples/ui.c @@ -80,8 +80,8 @@ void update_and_render_frame(void) { text_len -= i1 - i0; } - for (i64 n = 0; n < g_platform.clipboard_size;) { - UTF8_Char c = utf8_read(g_platform.clipboard_size - n, g_platform.clipboard + n); + for (i64 n = 0; n < g_platform.clipboard_text_len;) { + UTF8_Char c = utf8_read(g_platform.clipboard_text_len - n, g_platform.clipboard_text + n); if (text_len < (i64) (sizeof text / sizeof *text)) { for (i64 j = text_len; j > cursor; --j) @@ -104,7 +104,7 @@ void update_and_render_frame(void) { len += utf8_write(text[i0 + i], buf + len); if (len > 0) - p_clipboard_write(len, buf); + p_clipboard_write_text(len, buf); for (i64 i = 0; i1 + i < text_len; ++i) text[i0 + i] = text[i1 + i]; @@ -123,7 +123,7 @@ void update_and_render_frame(void) { len += utf8_write(text[i0 + i], buf + len); if (len > 0) - p_clipboard_write(len, buf); + p_clipboard_write_text(len, buf); } break; default:; |