Fix GL information fetching.
[dcpomatic.git] / src / wx / player_stress_tester.cc
index c0e6e8443f2c5640876e613a17250b7ce2931005..6dd2dd67473451f5bdcbb45f1f2fd03c0ea4a076 100644 (file)
@@ -24,8 +24,7 @@
 #include <dcp/util.h>
 #include <wx/wx.h>
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <string>
 #include <vector>
 #include <iostream>
@@ -67,6 +66,8 @@ Command::Command (string line)
                }
                type = SEEK;
                int_param = raw_convert<int>(bits[1]);
+       } else if (bits[0] == "E") {
+               type = EXIT;
        }
 }
 
@@ -97,7 +98,7 @@ PlayerStressTester::load_script (boost::filesystem::path file)
        vector<string> lines;
        string const script = dcp::file_to_string(file);
        boost::split (lines, script, boost::is_any_of("\n"));
-       BOOST_FOREACH (string i, lines) {
+       for (auto i: lines) {
                _commands.push_back (Command(i));
        }
        _current_command = _commands.begin();
@@ -156,6 +157,9 @@ PlayerStressTester::check_commands ()
                        _controls->seek (_current_command->int_param);
                        ++_current_command;
                        break;
+               case Command::EXIT:
+                       wxTheApp->GetTopWindow()->Destroy();
+                       break;
        }
 }