When NSHighResolutionCapable is set to true in the application plist, sf::Touch::getPosition is returning values that don't match the corresponding events. It doesn't seem to take the retina display into account.
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Main.hpp>
int main( int argc, char* argv[] )
{
sf::RenderWindow window( sf::VideoMode::getDesktopMode(), "Test" );
while ( window.isOpen() )
{
sf::Event event;
while ( window.pollEvent( event ) )
{
if ( event.type == sf::Event::TouchBegan )
{
std::cout << "A: " << event.touch.x << ", " << event.touch.y << std::endl;
sf::Vector2i pos = sf::Touch::getPosition( event.touch.finger );
std::cout << "B: " << pos.x << ", " << pos.y << std::endl;
}
}
window.clear();
window.display();
}
return 0;
}
I tested it in both the 4s and 6+ simulators (target SDK 8.1), using the bugfix/gles branch.