+ if (!window_size.empty())
+ {
+ RegMatch m = Regex("^([1-9][0-9]*)x([1-9][0-9]*)$").match(window_size);
+ if(!m)
+ throw usage_error("Invalid window size");
+
+ wnd_opts.width = lexical_cast<unsigned>(m[1].str);
+ wnd_opts.height = lexical_cast<unsigned>(m[2].str);
+ }