From 86ca3df07fa3e2da055fb0859b69452459492c1c Mon Sep 17 00:00:00 2001 From: pontscho Date: Mon, 4 Jun 2001 18:40:57 +0000 Subject: [PATCH] terminal reset bug with gui fixed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1006 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mplayer.c b/mplayer.c index b54f552723..b9738d13a5 100644 --- a/mplayer.c +++ b/mplayer.c @@ -337,7 +337,10 @@ void exit_player(char* how){ if(how) printf("\nExiting... (%s)\n",how); if(verbose) printf("max framesize was %d bytes\n",max_framesize); // restore terminal: - getch2_disable(); + #ifdef HAVE_GUI + if ( nogui ) + #endif + getch2_disable(); video_out->uninit(); #ifdef USE_XMMP_AUDIO if(verbose) printf("XMM: closing audio driver...\n"); @@ -462,6 +465,8 @@ int osd_visible=100; int osd_function=OSD_PLAY; int osd_last_pts=-303; +float a_frame=0; // Audio + float rel_seek_secs=0; #include "mixer.h" @@ -1384,7 +1389,6 @@ if(verbose) printf("vo_debug3: out_fmt=0x%08X\n",out_fmt); //float buffer_delay=0; float frame_correction=0; // A-V timestamp kulonbseg atlagolas int frame_corr_num=0; // -float a_frame=0; // Audio float v_frame=0; // Video float time_frame=0; // Timer float c_total=0; @@ -1407,10 +1411,17 @@ int drop_frame_cnt=0; lirc_mp_setup(); #endif + #ifdef HAVE_GUI + if ( nogui ) + { + #endif #ifdef USE_TERMCAP load_termcap(NULL); // load key-codes #endif if(f) getch2_enable(); + #ifdef HAVE_GUI + } + #endif //========= Catch terminate signals: ================ // terminate requests: