+ SGPath nextScreenshotPath(const std::string& screenshotDir)
+ {
+ char filename[32];
+ static int count = 1;
+ while (count < 1000) {
+ snprintf(filename, 32, "fgfs-screen-%03d.png", count++);
+
+ SGPath p(screenshotDir);
+ p.append(filename);
+ if (!p.exists()) {
+ return p;
+ }
+ }
+
+ return SGPath();
+ }
+
+ class GUISnapShotOperation :