| 16 | auto const DesktopMode = std::string("desktop"); |
| 17 | |
| 18 | GLFWvidmode convert(std::string const& mode) |
| 19 | { |
| 20 | std::vector<std::string> modeParts; |
| 21 | boost::split(modeParts, mode, [](char c) { return c == ' '; }); |
| 22 | |
| 23 | CHECK(modeParts.size() == 6); |
| 24 | |
| 25 | GLFWvidmode result; |
| 26 | result.width = std::stoi(modeParts.at(0)); |
| 27 | result.height = std::stoi(modeParts.at(1)); |
| 28 | result.redBits = std::stoi(modeParts.at(2)); |
| 29 | result.greenBits = std::stoi(modeParts.at(3)); |
| 30 | result.blueBits = std::stoi(modeParts.at(4)); |
| 31 | result.refreshRate = std::stoi(modeParts.at(5)); |
| 32 | return result; |
| 33 | } |
| 34 | |
| 35 | std::string convert(GLFWvidmode const& vidmode) |
| 36 | { |
no test coverage detected