mirror of https://github.com/axmolengine/axmol.git
Modify handle_key_input function for responding the onKeyReleased
This commit is contained in:
parent
31bccd52d4
commit
1ee7f72276
|
@ -402,16 +402,16 @@ static int32_t handle_key_input(AInputEvent *event)
|
|||
{
|
||||
cocos2d::KeyboardEvent event;
|
||||
event._keyCode = cocos2d::KeyboardEvent::KeyCode::KEY_BACKSPACE;
|
||||
event._isPressed = false;
|
||||
cocos2d::EventDispatcher::getInstance()->dispatchEvent(&event);
|
||||
LOGI("AKEYCODE_BACK");
|
||||
}
|
||||
return 1;
|
||||
case AKEYCODE_MENU:
|
||||
{
|
||||
cocos2d::KeyboardEvent event;
|
||||
event._keyCode = cocos2d::KeyboardEvent::KeyCode::KEY_MENU;
|
||||
event._isPressed = false;
|
||||
cocos2d::EventDispatcher::getInstance()->dispatchEvent(&event);
|
||||
LOGI("AKEYCODE_MENU");
|
||||
}
|
||||
return 1;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue