Skip to content

Commit

Permalink
Adjust MAXROW/MAXCOL to values aligned with 1920x1080 landscape resol…
Browse files Browse the repository at this point in the history
…ution. If smaller font or portrait, limit to 400x150 (colxrow).
  • Loading branch information
rfivet committed Jan 5, 2015
1 parent 48ea927 commit e096092
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@
#define CTLX 0x40000000 /* ^X flag, or'ed in */
#define SPEC 0x80000000 /* special key (function keys) */

#define MAXCOL 500
#define MAXROW 500
/* Actual 380x134 on a 1920x1080 screen in landscape,
if smaller font or portrait orientation limit to 400x150 */
#define MAXCOL 400
#define MAXROW 150
5 changes: 5 additions & 0 deletions tcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ static void tcapopen(void)
/* At initialization we use maximum size even if current OS window is smaller */
term.t_mrow = MAXROW ;
term.t_mcol = MAXCOL ;
if( term.t_nrow >= term.t_mrow)
term.t_nrow = term.t_mrow - 1 ;

if( term.t_ncol > term.t_mcol)
term.t_ncol = term.t_mcol ;
#else
term.t_mrow = term.t_nrow > MAXROW ? MAXROW : term.t_nrow;
term.t_mcol = term.t_ncol > MAXCOL ? MAXCOL : term.t_ncol;
Expand Down

0 comments on commit e096092

Please sign in to comment.