[DEBUG] correct android up and down for touch event

This commit is contained in:
Edouard DUPIN 2016-01-23 02:28:15 +01:00
parent 4dbd574790
commit 7a7c690a70
2 changed files with 34 additions and 34 deletions

View File

@ -713,19 +713,19 @@ extern "C" {
jobject _thiz,
jint _id,
jint _pointerID,
jboolean _isUp,
jboolean _isDown,
jfloat _x,
jfloat _y) {
std::unique_lock<std::mutex> lock(g_interfaceMutex);
if( _id >= (int32_t)s_listInstance.size()
|| _id < 0
|| nullptr == s_listInstance[_id] ) {
|| s_listInstance[_id] == nullptr ) {
GALE_ERROR("Call C With an incorrect instance _id=" << (int32_t)_id);
// TODO : generate error in java to stop the current instance
return;
}
s_listInstance[_id]->OS_SetInput(gale::key::type_finger,
(_isUp==false?gale::key::status_down:gale::key::status_up),
(_isDown==true?gale::key::status_down:gale::key::status_up),
_pointerID+1,
vec2(_x,_y));
}
@ -754,7 +754,7 @@ extern "C" {
jobject _thiz,
jint _id,
jint _pointerID,
jboolean _isUp,
jboolean _isDown,
jfloat _x,
jfloat _y) {
std::unique_lock<std::mutex> lock(g_interfaceMutex);
@ -766,7 +766,7 @@ extern "C" {
return;
}
s_listInstance[_id]->OS_SetInput(gale::key::type_mouse,
(_isUp==false?gale::key::status_down:gale::key::status_up),
(_isDown==true?gale::key::status_down:gale::key::status_up),
_pointerID+1,
vec2(_x,_y));
}