# iOS: Touchevent slows down whole app

**URL:** <https://discourse.libsdl.org/t/ios-touchevent-slows-down-whole-app/20269>\
**Category:** SDL Development\
**Created:** [January 3, 2014, 3:14pm UTC](https://discourse.libsdl.org/t/ios-touchevent-slows-down-whole-app/20269 "2014-01-03T15:14:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Knobe](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@Daniel\_Knobe](https://discourse.libsdl.org/u/Daniel_Knobe)\
**Post date:** [January 3, 2014, 3:14pm UTC](https://discourse.libsdl.org/t/ios-touchevent-slows-down-whole-app/20269/1 "2014-01-03T15:14:24Z")

</div>

Hallo,  
I have a small problem.  
When I start my app on an iOS device everything is very smooth and fast.  
When I touch the screen (my app process touch finger events) the fps  
slows down dramaticly (from fast to unplayable).  
Same code works well on Android.

Here some snippets:  
SDL\_TouchID device = SDL\_GetTouchDevice(0);

for (int i = 0; i \< SDL\_GetNumTouchFingers(device); i++)  
{  
SDL\_Finger \*finger = SDL\_GetTouchFinger(device, i);

```
 if (finger == NULL)
     continue;

     posX = finger->x;
     posY = finger->y;
 }

```

}

Best regards,  
Daniel

---

<div class="post-metadata">

**Author:** ![Timodor](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/c0e974/32.png) [@Timodor](https://discourse.libsdl.org/u/Timodor)\
**Post date:** [January 3, 2014, 11:17pm UTC](https://discourse.libsdl.org/t/ios-touchevent-slows-down-whole-app/20269/2 "2014-01-03T23:17:51Z")

</div>

I tried your code, which modified to try fix an issue I’m having. It seems to work fine, with no slow down’s, but my issue is still the same.

I don’t know if it’s me, but maybe there is no such thing as FULL DUAL touch support.

I tried this, above the SDL\_FINGER DOWN EVENT and inside it, with no luck whats so ever.

[code SDL\_TouchID device = SDL\_GetTouchDevice(0);

```
	for (int i = 0; i < SDL_GetNumTouchFingers(device); i++)
	{
		//SDL *FINGER
		arnold[i] = SDL_GetTouchFinger(device, i);

		if (arnold[i] != NULL)
		{
			if (i == 0)
			{
				bf1 = true;
				iMouseX = Display0->GetScreenWidth() * arnold[i]->x;
				iMouseY = Display0->GetScreenHeight() * arnold[i]->y;
			}

			if (i == 1)
			{
				bf2 = true;
				iMouseX2 = Display0->GetScreenWidth() * arnold[i]->x;
				iMouseY2 = Display0->GetScreenHeight() * arnold[i]->y;
			}

		}
	}][/code]
```

---

<div class="post-metadata">

**Author:** ![Timodor](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/c0e974/32.png) [@Timodor](https://discourse.libsdl.org/u/Timodor)\
**Post date:** [January 4, 2014, 12:02am UTC](https://discourse.libsdl.org/t/ios-touchevent-slows-down-whole-app/20269/3 "2014-01-04T00:02:58Z")

</div>

touch 2 does not register on 1 / 3 of the left side of the screen.  
touch 1 register’s everywhere.
