I actually just figured it out, but I have a question. Here is the code for my thread:
void extraWindow(void *UserData)
{
sf::Window App2(sf::VideoMode::GetMode(1), "Laz's Interactive Map :: The Wrath... :: PvP Created");
while (App2.IsOpened())
{
std::cout << "hi";
sf::Event ThreadEvent;
while (App2.GetEvent(ThreadEvent))
{
// Close window : exit
if (ThreadEvent.Type == sf::Event::Closed)
{
App2.Close();
}
// Press escape : exit
if ((ThreadEvent.Type == sf::Event::KeyPressed) && (ThreadEvent.Key.Code == sf::Key::Escape))
App2.Close();
}
}
}
As you can see it creates a window and then waits for an event to close the window. When the window is closed, does the thread keep running? If so, is that bad? If so, is there a way to shut it down from inside the thread?