From 1deb98f57f7b597be941fd944a91f2daa1a1f10a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Jun 2019 14:49:56 +0200 Subject: Rename PuglEventKey::utf8 to "string" with char type This matches Gtk and is generally less annoying to work with. --- pugl/pugl_win.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pugl/pugl_win.c') diff --git a/pugl/pugl_win.c b/pugl/pugl_win.c index 9d5b124..c2ccff3 100644 --- a/pugl/pugl_win.c +++ b/pugl/pugl_win.c @@ -534,24 +534,24 @@ static void wcharBufToEvent(wchar_t* buf, int n, PuglEvent* event) { if (n > 0) { - char* charp = (char*)event->key.utf8; + char* charp = (char*)event->key.string; if (!WideCharToMultiByte(CP_UTF8, 0, buf, n, charp, 8, NULL, NULL)) { /* error: could not convert to utf-8, GetLastError has details */ - memset(event->key.utf8, 0, 8); + memset(event->key.string, 0, 8); // replacement character - event->key.utf8[0] = 0xEF; - event->key.utf8[1] = 0xBF; - event->key.utf8[2] = 0xBD; + event->key.string[0] = 0xEF; + event->key.string[1] = 0xBF; + event->key.string[2] = 0xBD; } event->key.character = utf16_to_code_point(buf, n); } else { // replacement character - event->key.utf8[0] = 0xEF; - event->key.utf8[1] = 0xBF; - event->key.utf8[2] = 0xBD; + event->key.string[0] = 0xEF; + event->key.string[1] = 0xBF; + event->key.string[2] = 0xBD; event->key.character = 0xFFFD; } } -- cgit v1.2.1