# HG changeset patch # User pontscho # Date 991680057 0 # Node ID 90682d6f84f5b03da3647a4932636249119d394a # Parent 57972eb8127ad4032693741d1cfb23e6bccb1892 terminal reset bug with gui fixed diff -r 57972eb8127a -r 90682d6f84f5 mplayer.c --- a/mplayer.c Mon Jun 04 18:23:10 2001 +0000 +++ b/mplayer.c Mon Jun 04 18:40:57 2001 +0000 @@ -337,7 +337,10 @@ 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_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 @@ //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 @@ 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: