diff src/events/SDL_keyboard.c @ 4763:518d1679d2d0

Merged Daniel's Google Summer of Code work from SDL-gsoc2010_IME
author Sam Lantinga <slouken@libsdl.org>
date Sun, 22 Aug 2010 12:39:27 -0700
parents 833a225613e2 436183eb30c8
children e725a6a60c32
line wrap: on
line diff
--- a/src/events/SDL_keyboard.c	Sun Aug 22 12:35:34 2010 -0700
+++ b/src/events/SDL_keyboard.c	Sun Aug 22 12:39:27 2010 -0700
@@ -778,7 +778,7 @@
         SDL_Event event;
         event.text.type = SDL_TEXTINPUT;
         event.text.windowID = keyboard->focus ? keyboard->focus->id : 0;
-        SDL_strlcpy(event.text.text, text, SDL_arraysize(event.text.text));
+        SDL_utf8strlcpy(event.text.text, text, SDL_arraysize(event.text.text));
         event.text.windowID = keyboard->focus ? keyboard->focus->id : 0;
         posted = (SDL_PushEvent(&event) > 0);
     }
@@ -799,7 +799,7 @@
         event.edit.windowID = keyboard->focus ? keyboard->focus->id : 0;
         event.edit.start = start;
         event.edit.length = length;
-        SDL_strlcpy(event.edit.text, text, SDL_arraysize(event.edit.text));
+        SDL_utf8strlcpy(event.edit.text, text, SDL_arraysize(event.edit.text));
         posted = (SDL_PushEvent(&event) > 0);
     }
     return (posted);