diff 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
line wrap: on
line diff
--- a/mplayer.c	Tue Nov 09 19:06:27 2004 +0000
+++ b/mplayer.c	Tue Nov 09 20:09:26 2004 +0000
@@ -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