| 222 | } |
| 223 | |
| 224 | static bool ParseSamples(std::uint32_t& samples, int argc, char* argv[]) |
| 225 | { |
| 226 | const LLGL::StringView msArg = "-ms="; |
| 227 | for_subrange(i, 1, argc) |
| 228 | { |
| 229 | const LLGL::StringView arg = argv[i]; |
| 230 | if (arg.compare(0, msArg.size(), msArg) == 0) |
| 231 | { |
| 232 | if (arg.size() < msArg.size() + 1) |
| 233 | return false; |
| 234 | |
| 235 | int value = ::atoi(argv[i] + msArg.size()); |
| 236 | samples = static_cast<std::uint32_t>(std::max(1, std::min(value, 16))); |
| 237 | |
| 238 | return true; |
| 239 | } |
| 240 | } |
| 241 | return false; |
| 242 | } |
| 243 | |
| 244 | |
| 245 | /* |
no test coverage detected