Touch coordinates issue

I am using auto window resizing for my glView (480 x 320).

When I get coordinates from touches, things work correctly on iOS, but in android I have to include the following hack

CCPoint location = touch~~>locationInView);
#if
location.y = 320.0f~~ location.y;
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
location = sharedDirector->convertToGL(location);
#endif

The same problems shows up with Cocos-2dx controls like menu, so I don’t want to keep applying the same code above. Am I doing something wrong here?

Thanks!

Found the issue….in main.cpp setting the size should be done after creating the window :slight_smile:

Got confused by the location of the commented line