Advertisement
spacechase0

SFML iOS NSHighResolutionCapable Bug

Apr 28th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <SFML/Main.hpp>
  2. #include <SFML/Graphics.hpp>
  3. #include <iostream>
  4.  
  5. int main( int argc, char* argv[] )
  6. {
  7.     sf::RenderWindow window( sf::VideoMode::getDesktopMode(), "Test" );
  8.    
  9.     while ( window.isOpen() )
  10.     {
  11.         sf::Event event;
  12.         while ( window.pollEvent( event ) )
  13.         {
  14.             if ( event.type == sf::Event::TouchBegan )
  15.             {
  16.                 std::cout << "A: " << event.touch.x << ", " << event.touch.y << std::endl;
  17.                 sf::Vector2i pos = sf::Touch::getPosition( event.touch.finger );
  18.                 std::cout << "B: " << pos.x << ", " << pos.y << std::endl;
  19.             }
  20.         }
  21.        
  22.         window.clear();
  23.         window.display();
  24.     }
  25.    
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement