Browse Source

fixed disabled multitouch

dmuratshin 9 years ago
parent
commit
f9a7482a18
1 changed files with 5 additions and 2 deletions
  1. 5 2
      oxygine/src/Input.cpp

+ 5 - 2
oxygine/src/Input.cpp

@@ -18,7 +18,12 @@ namespace oxygine
     void Input::sendPointerButtonEvent(spStage stage, MouseButton button, float x, float y, float pressure, int type, PointerState* ps)
     void Input::sendPointerButtonEvent(spStage stage, MouseButton button, float x, float y, float pressure, int type, PointerState* ps)
     {
     {
         if (!_multiTouch && ps->getIndex() != 1 && ps != &_pointerMouse)
         if (!_multiTouch && ps->getIndex() != 1 && ps != &_pointerMouse)
+        {
+            if (type == TouchEvent::TOUCH_UP)
+                _ids[ps->getIndex() - 1] = 0;
+            
             return;
             return;
+        }
 
 
         Vector2 p(x, y);
         Vector2 p(x, y);
 
 
@@ -39,9 +44,7 @@ namespace oxygine
         stage->handleEvent(&me);
         stage->handleEvent(&me);
 
 
         if (type == TouchEvent::TOUCH_UP)
         if (type == TouchEvent::TOUCH_UP)
-        {
             _ids[ps->getIndex() - 1] = 0;
             _ids[ps->getIndex() - 1] = 0;
-        }
     }
     }
 
 
     void Input::sendPointerMotionEvent(spStage stage, float x, float y, float pressure, PointerState* ps)
     void Input::sendPointerMotionEvent(spStage stage, float x, float y, float pressure, PointerState* ps)