I compared the sample and my project, and got it to work by adding this:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode::GetDesktopMode(), "SFML", sf::Style::Fullscreen);
App.UseVerticalSync(true);
sf::Image Image;
if (!Image.LoadFromFile("image.jpg")) return EXIT_FAILURE;
sf::Sprite Sprite(Image);
Sprite.SetCenter(1280, 960);
while (App.IsOpened())
{
/////////////////////////////////////////////////////START
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed) { App.Close(); break; }
}
/////////////////////////////////////////////////////END
float Time = App.GetFrameTime();
if (App.GetInput().IsKeyDown(sf::Key::Left)) Sprite.SetX(Sprite.GetPosition().x - Time * Sprite.GetSize().x);
if (App.GetInput().IsKeyDown(sf::Key::Right)) Sprite.SetX(Sprite.GetPosition().x + Time * Sprite.GetSize().x);
if (App.GetInput().IsKeyDown(sf::Key::Up)) Sprite.SetY(Sprite.GetPosition().y - Time * Sprite.GetSize().y);
if (App.GetInput().IsKeyDown(sf::Key::Down)) Sprite.SetY(Sprite.GetPosition().y + Time * Sprite.GetSize().y);
if (App.GetInput().IsKeyDown(sf::Key::C)) Sprite.Rotate(- 180 * Time);
if (App.GetInput().IsKeyDown(sf::Key::V)) Sprite.Rotate(+ 180 * Time);
if (App.GetInput().IsKeyDown(sf::Key::Z)) Sprite.SetScale(Sprite.GetScale().x * (Time + 1), Sprite.GetScale().y * (Time + 1));
if (App.GetInput().IsKeyDown(sf::Key::X)) Sprite.SetScale(Sprite.GetScale().x / (Time + 1), Sprite.GetScale().y / (Time + 1));
if (App.GetInput().IsKeyDown(sf::Key::Escape)) App.Close();
App.Draw(Sprite);
App.Display();
}
return EXIT_SUCCESS;
}
Before it worked without handling events, but i guess now the events, when unhandled, flood the processor or something and cause this error i've experienced.