File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -547,6 +547,10 @@ static void gl_show_help(bool full) {
547547 << " \t window size in pixels, with optional position; full\n "
548548 << " \t\t\t syntax: " TBOLD (" [<W>x<H>][{+-}<X>[{+-}<Y>]]" )
549549 << (full ? " [1]" : " " ) << " \n " ;
550+ if (full) {
551+ col () << TBOLD (" \t size=<mode_name>" )
552+ << " mode name (eg. VGA), use \" help\" to show\n " ;
553+ }
550554 col () << TBOLD (" \t fixed_size" ) << " \t do not resize window on new stream\n " ;
551555 col () << TBOLD (" \t noresizable" ) << " \t window won't be resizable (useful with size=)\n " ;
552556#ifdef SPOUT
@@ -614,6 +618,13 @@ static bool set_size(struct state_gl *s, const char *tok)
614618 if (strchr (tok, ' %' ) != NULL ) {
615619 s->window_size_factor = atof (tok) / 100.0 ;
616620 } else if (strpbrk (tok, " x+-" ) == NULL ) {
621+ struct video_desc desc = get_video_desc_from_string (tok);
622+ if (desc.width != 0 ) {
623+ s->fixed_size = true ;
624+ s->fixed_w = desc.width ;
625+ s->fixed_h = desc.height ;
626+ return true ;
627+ }
617628 log_msg (LOG_LEVEL_ERROR, MOD_NAME " Wrong size spec: %s\n " , tok);
618629 return false ;
619630 }
You can’t perform that action at this time.
0 commit comments