aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-09 20:09:26 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-09 20:09:26 +0000
commitd05cfecee81b7dea22aacceac07aa92d23b5c602 (patch)
tree36aad4989a917f1edb13db7aae33a1edee3f0370
parent39118cda2613f121940697ce3636787f7015f547 (diff)
use get_screen_size from getch2.c instead of ioctl, fixes bug #131.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13907 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--mplayer.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mplayer.c b/mplayer.c
index 4bc4ec6c73..b5c446a177 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -815,12 +815,10 @@ static void print_status(float a_pos, float a_v, float corr)
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