SFML community forums
Help => Window => Topic started by: HardCoded on November 07, 2011, 12:17:32 am
-
I'm using SFML2.0 and VC++2010 and when I compile and run this:
int main () {
sf::RenderWindow App(sf::VideoMode(X_RATIO, Y_RATIO, 32), WINDOW_TITLE);
App.SetFramerateLimit(32);
while (true) {
App.Display();
}
return 0;
}
I can't seem to 'click' on the window it creates or move it about or do anything with it.
However, I can interact with the console window that opens up with it.
Am I missing something?
-
pumping the message queue?
In C# it's App.DispatchEvents();
There should be something similar in the original c++ version
-
Ahh..
Got it working now.
I just added this to the loop: App.PollEvent(sf::Event());
I used a temporary sf::Event because I don't need the Events for now.
Thanks.
-
I just added this to the loop: App.PollEvent(sf::Event());
This is not valid C++ (passing a temporary as a non-const reference), I suggest that you configure your compiler so that it doesn't silently skip this kind of error ;)