SDL 2, function touchLocation in SDL_uikitview.m is wrong

  • (CGPoint)touchLocation:(UITouch *)touch

{

CGPoint point = [touch locationInView: self];

return point;

}

the point is a stack variable. it will delete after return

Thanks but, this is okay. CGPoint is a struct. Point will be copied to
the return value.

-EricOn 3/10/12, ?? <81508634 at qq.com> wrote:

  • (CGPoint)touchLocation:(UITouch *)touch

{

CGPoint point = [touch locationInView: self];

return point;

}

the point is a stack variable. it will delete after return


Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/