소스 검색

fixed disabled multitouch

dmuratshin 9 년 전
부모
커밋
f9a7482a18
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  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)
     {
         if (!_multiTouch && ps->getIndex() != 1 && ps != &_pointerMouse)
+        {
+            if (type == TouchEvent::TOUCH_UP)
+                _ids[ps->getIndex() - 1] = 0;
+            
             return;
+        }
 
         Vector2 p(x, y);
 
@@ -39,9 +44,7 @@ namespace oxygine
         stage->handleEvent(&me);
 
         if (type == TouchEvent::TOUCH_UP)
-        {
             _ids[ps->getIndex() - 1] = 0;
-        }
     }
 
     void Input::sendPointerMotionEvent(spStage stage, float x, float y, float pressure, PointerState* ps)