diff --git a/PanoPainter/GameViewController.m b/PanoPainter/GameViewController.m index ea7d77f..08f02af 100644 --- a/PanoPainter/GameViewController.m +++ b/PanoPainter/GameViewController.m @@ -203,15 +203,10 @@ std::set ignored_touch; if (source == kEventSource::Stylus) pen_down = true; -// if (touch.majorRadius > 25.f) -// ignored_touch.insert(touch); -// NSLog(@"touch down size %f", touch.majorRadius); -// [self async_lock]; std::lock_guard lock(task_mutex); tasklist.emplace_back([touchLocation, scale, f=touch.force, source] { App::I.mouse_down(0, touchLocation.x * scale, touchLocation.y * scale, f, source); }); -// [self async_unlock]; t_count = 1; t_pos = {touchLocation.x * scale, touchLocation.y * scale}; } @@ -252,7 +247,6 @@ std::set ignored_touch; p1 = glm::vec2(tl1.x * scale, tl1.y * scale); } - //[self async_lock]; if (pen_down) { std::lock_guard lock(task_mutex); @@ -281,7 +275,6 @@ std::set ignored_touch; { UITouch *touch = valid_touches[0]; CGPoint touchLocation = [touch locationInView:self.view]; - //auto p = glm::vec2(touchLocation.x * scale, touchLocation.y * scale); float force = touch.type == UITouchType::UITouchTypeStylus ? touch.force : 1.0f; if (t_count == 2) { @@ -297,7 +290,6 @@ std::set ignored_touch; }); } } - //[self async_unlock]; t_pos = {tl0.x * scale, tl0.y * scale}; } -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event @@ -315,12 +307,6 @@ std::set ignored_touch; kEventSource source = touch.type == UITouchType::UITouchTypeStylus ? kEventSource::Stylus : kEventSource::Touch; pen_down = false; -// [self async_lock]; -// if (t_count == 2) -// App::I.gesture_end(); -// else -// App::I.mouse_up(0, touchLocation.x * scale, touchLocation.y * scale, source); -// [self async_unlock]; std::lock_guard lock(task_mutex); tasklist.emplace_back([tc=t_count, touchLocation, scale, source] { if (tc == 2) @@ -418,11 +404,6 @@ std::set ignored_touch; #pragma mark - GLKView and GLKViewController delegate methods -- (void)update -{ - -} - - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect { static auto time = std::chrono::steady_clock::now();