mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
[Android] Fixed unicode value of text entered event is always 0
This commit is contained in:
parent
67c7a5d176
commit
2d682d324f
@ -604,7 +604,7 @@ int WindowImplAndroid::getUnicode(AInputEvent* event)
|
||||
// Construct a KeyEvent object from the event data
|
||||
jclass ClassKeyEvent = lJNIEnv->FindClass("android/view/KeyEvent");
|
||||
jmethodID KeyEventConstructor = lJNIEnv->GetMethodID(ClassKeyEvent, "<init>", "(JJIIIIIIII)V");
|
||||
jobject ObjectKeyEvent = lJNIEnv->NewObject(ClassKeyEvent, KeyEventConstructor, (jvalue*)downTime, (jvalue*)eventTime, (jvalue*)action, (jvalue*)code, (jvalue*)repeat, (jvalue*)metaState, (jvalue*)deviceId, (jvalue*)scancode, (jvalue*)flags, (jvalue*)source);
|
||||
jobject ObjectKeyEvent = lJNIEnv->NewObject(ClassKeyEvent, KeyEventConstructor, downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags, source);
|
||||
|
||||
// Call its getUnicodeChar() method to get the unicode value
|
||||
jmethodID MethodGetUnicode = lJNIEnv->GetMethodID(ClassKeyEvent, "getUnicodeChar", "(I)I");
|
||||
|
Loading…
Reference in New Issue
Block a user