[MPlayer-cvslog] CVS: main mplayer.c,1.808,1.809
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Tue Nov 9 21:09:28 CET 2004
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv19391
Modified Files:
mplayer.c
Log Message:
use get_screen_size from getch2.c instead of ioctl, fixes bug #131.
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.808
retrieving revision 1.809
diff -u -r1.808 -r1.809
--- mplayer.c 7 Nov 2004 19:58:42 -0000 1.808
+++ mplayer.c 9 Nov 2004 20:09:26 -0000 1.809
@@ -815,12 +815,10 @@
int width;
char *line;
unsigned pos = 0;
-#ifndef __MINGW32__
- struct winsize ws;
- if (ioctl(0, TIOCGWINSZ, &ws) != -1 && ws.ws_col)
- width = ws.ws_col;
+ get_screen_size();
+ if (screen_width > 0)
+ width = screen_width;
else
-#endif
width = 80;
line = malloc(width + 1); // one additional for terminating null
More information about the MPlayer-cvslog
mailing list