Hi,
the code works, it's just that the return code is weird:
#include <SFML/Graphics.hpp>
sf::RenderWindow wnd;
void sig()
{
wnd.setActive(true);
wnd.clear(sf::Color::Green);
wnd.display();
wnd.setActive(false);
}
int main()
{
wnd.create(sf::VideoMode(800, 600, 32), "Title", sf::Style::Default);
wnd.setActive(false);
sf::Thread ap(sig);
ap.launch();
ap.wait();
return 0;
}
This is a minimal example, and it returns 234, or 0xEA in hex.
#include <SFML/Graphics.hpp>
sf::RenderWindow wnd;
void sig()
{
wnd.setActive(true);
wnd.clear(sf::Color::Green);
wnd.display();
}
int main()
{
wnd.create(sf::VideoMode(800, 600, 32), "Title", sf::Style::Default);
wnd.setActive(false);
sf::Thread ap(sig);
ap.launch();
ap.wait();
return 0;
}
Will cause a segmentation fault and return 139 (0x8B).
What am I doing wrong?