Fixed up: Move file-static RenderWindow and RenderTexture instances inside functions to fix GL race condition on startup (#682)

This commit is contained in:
Nathan R
2025-03-06 18:31:18 -06:00
committed by Nat Quayle Nelson
parent cf736d1835
commit 598fd4836a
51 changed files with 719 additions and 712 deletions

View File

@@ -6,7 +6,12 @@
// After this are some globals that are referenced from common code but not defined, and not used in the test cases
#include "gfx/gfxsheets.hpp"
#include "universe/universe.hpp"
sf::RenderWindow mainPtr;
sf::RenderWindow& mainPtr()
{
static sf::RenderWindow instance;
return instance;
}
std::string scenario_temp_dir_name = "test_scenario";
cCustomGraphics spec_scen_g;
cUniverse univ;