Mercurial > mplayer.hg
comparison mplayer.c @ 13906:db2f1e657dfe
use get_screen_size from getch2.c instead of ioctl, fixes bug #131.
author | reimar |
---|---|
date | Tue, 09 Nov 2004 20:09:26 +0000 |
parents | 9f1c3cf149fe |
children | 6a0b5d320378 |
comparison
equal
deleted
inserted
replaced
13905:8c8a845422f4 | 13906:db2f1e657dfe |
---|---|
813 static void print_status(float a_pos, float a_v, float corr) | 813 static void print_status(float a_pos, float a_v, float corr) |
814 { | 814 { |
815 int width; | 815 int width; |
816 char *line; | 816 char *line; |
817 unsigned pos = 0; | 817 unsigned pos = 0; |
818 #ifndef __MINGW32__ | 818 get_screen_size(); |
819 struct winsize ws; | 819 if (screen_width > 0) |
820 if (ioctl(0, TIOCGWINSZ, &ws) != -1 && ws.ws_col) | 820 width = screen_width; |
821 width = ws.ws_col; | |
822 else | 821 else |
823 #endif | |
824 width = 80; | 822 width = 80; |
825 line = malloc(width + 1); // one additional for terminating null | 823 line = malloc(width + 1); // one additional for terminating null |
826 | 824 |
827 // Audio time | 825 // Audio time |
828 if (sh_audio) { | 826 if (sh_audio) { |