Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualfreakchild

Posted 14 March 2013 - 09:28 AM

Try removing the static keyword from static int rb_down = No; and the equivalent in your lb function.

 

Looks to me like it gets the touches regardless of whether any are down or not, so 'if (touches)' is always true which prevents the alternative 'else rb_down = No' from executing.  If the touch is outside the radius the subsequent setting of rb_down to Yes is missed.  While that wouldn't matter (given it sets to Yes', the point is that nothing is setting it to anything in that circumstance...and thus it will remain as 'Yes' from when the touch was within radius.

 

The problem is that there is basically nothing that sets this to 'No' after the first initialization to that with the static keyword.  Once it goes to yes, it stays yes...unless you lift all fingers up, in which case your 'if( touch_count != 0 )' triggered ZeroMemory call does the work, or you lift the finger in question (triggering touchesEnded, which will also do it).


#7freakchild

Posted 14 March 2013 - 09:23 AM

Try removing the static keyword from static int rb_down = No; and the equivalent in your lb function.

 

Looks to me like it gets the touches regardless of whether any are down or not, so 'if (touches)' is always true which prevents the alternative 'else rb_down = No' from executing.  If the touch is outside the radius the subsequent setting of rb_down to Yes is missed.  While that wouldn't matter (given it sets to Yes', the point is that nothing is setting it to anything in that circumstance...and thus it will remain as 'Yes' from when the touch was within radius.

 

The problem is that there is basically nothing that sets this to 'No' after first initialization to that with the static keyword.  Once it goes to yes, it stays yes...unless you lift all fingers up, in which case your 'if( touch_count != 0 )' triggered ZeroMemory call does the work, or you lift the finger in question (tiggering touchesEnded) but I think this fact is misleading you.


#6freakchild

Posted 14 March 2013 - 09:17 AM

Try removing the static keyword from static int rb_down = No; and the equivalent in your lb function.

 

Looks to me like it gets the touches regardless of whether any are down or not, so 'if (touches)' is always true which prevents the alternative 'else rb_down = No' from executing.  If the touch is outside the radius the subsequent setting of rb_down to Yes is missed.  While that wouldn't matter (given it sets to Yes', the point is that nothing is setting it to anything in that circumstance...and thus it will remain as 'Yes' from when the touch was within radius.

 

The problem is that there is basically nothing that sets this to 'No' after first initialization to that with the static keyword.  Once it goes to yes, it stays yes...unless you lift all fingers up, in which case your 'if( touch_count != 0 )' triggered ZeroMemory call does the work but I think this fact is misleading you.


#5freakchild

Posted 14 March 2013 - 09:15 AM

Try removing the static keyword from static int rb_down = No; and the equivalent in your lb function.

 

Looks to me like it gets the touches regardless of whether any are down or not, so 'if (touches)' is always true which prevents the alternative 'else rb_down = No' from executing.  If the touch is outside the radius the subsequent setting of rb_down to Yes is missed.  While that wouldn't matter, it looks to not be set to anything at all in that circumstance...and thus it will remain as 'Yes' from when the touch was within radius.  There is basically nothing that sets this to 'No' after first initialization with the static keyword.  Once it goes to yes, it stays yes...unless you lift all fingers up, in which case your 'if( touch_count != 0 )' triggered ZeroMemory call does the work but I think this fact is misleading you.


#4freakchild

Posted 14 March 2013 - 09:14 AM

Try removing the static keyword from static int rb_down = No; and the equivalent in your lb function.

 

Looks to me like it gets the touches regardless of whether any are down or not, so 'if (touches)' is always true which prevents the alternative 'else rb_down = No' from executing.  If the touch is outside the radius the subsequent setting of rb_down to Yes is missed.  While that wouldn't matter, it looks to not be set to anything at all in that circumstance...and thus it will remain as 'Yes' from when the touch was within radius.  There is basically nothing that sets this to 'No' after first initialization with the static keyword.  Once it goes to yes, it stays...unless you lift all fingers up, in which case your ZeroMemory call does the work but I think this fact is misleading you.


#3freakchild

Posted 14 March 2013 - 09:13 AM

Try removing the static keyword from static int rb_down = No; and the equivalent in your lb function.

 

Looks to me like it gets the touches regardless of whether any are down or not, so 'if (touches)' is always true which prevents the alternative 'else rb_down = No' from executing.  If the touch is outside the radius the subsequent setting of rb_down to Yes is missed.  While that wouldn't matter, it looks to not be set to anything at all in that circumstance...and thus it will remain as 'Yes' from when the touch was within radius.  There is basically nothing that sets this to 'No' after first initialization with the static keyword.  Once it goes to yes, it stays.


PARTNERS