Fix the multitouch support on iOS

It's strange why touches parameter passed to the methods doesn't have all touches. But this fix works for me.
This commit is contained in:
Nikolay Grebenshikov
2015-08-21 15:54:58 +06:00
parent a4e6cbaafe
commit 6fd3b4142a

View File

@@ -523,7 +523,7 @@ static std::string nmeTitle;
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSArray *touchArr = [touches allObjects];
NSArray *touchArr = [[event allTouches] allObjects];
NSInteger touchCnt = [touchArr count];
for(int i=0;i<touchCnt;i++)
@@ -558,7 +558,7 @@ static std::string nmeTitle;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
NSArray *touchArr = [touches allObjects];
NSArray *touchArr = [[event allTouches] allObjects];
NSInteger touchCnt = [touchArr count];
for(int i=0;i<touchCnt;i++)
@@ -588,7 +588,7 @@ static std::string nmeTitle;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
NSArray *touchArr = [touches allObjects];
NSArray *touchArr = [[event allTouches] allObjects];
NSInteger touchCnt = [touchArr count];
for(int i=0;i<touchCnt;i++)