# HG changeset patch # User pontscho # Date 999267388 0 # Node ID 82e77faa73417c9847dec85fdfddd5ed6168f1d9 # Parent e16646a140fde15f69158e6cae021c17632d631c async reply fix ? diff -r e16646a140fd -r 82e77faa7341 Gui/mplayer/play.c --- a/Gui/mplayer/play.c Fri Aug 31 13:05:37 2001 +0000 +++ b/Gui/mplayer/play.c Fri Aug 31 14:16:28 2001 +0000 @@ -205,4 +205,11 @@ mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow ); } } + mplShMem->SkinChange=0; } + +void EventHandling( void ) +{ + wsHandleEvents();mplTimerHandler(0); // handle GUI timer events + if ( mplShMem->SkinChange ) ChangeSkin(); +} diff -r e16646a140fd -r 82e77faa7341 Gui/mplayer/play.h --- a/Gui/mplayer/play.h Fri Aug 31 13:05:37 2001 +0000 +++ b/Gui/mplayer/play.h Fri Aug 31 14:16:28 2001 +0000 @@ -47,6 +47,8 @@ int TimeSec; int LengthInSec; char Filename[4096]; + + int SkinChange; } mplCommStruct; extern mplCommStruct * mplShMem; @@ -82,5 +84,6 @@ extern void mplPlayerThread( void ); extern void ChangeSkin( void ); +extern void EventHandling( void ); #endif diff -r e16646a140fd -r 82e77faa7341 Gui/mplayer/psignal.c --- a/Gui/mplayer/psignal.c Fri Aug 31 13:05:37 2001 +0000 +++ b/Gui/mplayer/psignal.c Fri Aug 31 14:16:28 2001 +0000 @@ -168,7 +168,7 @@ if ( s != SIGTYPE ) return; // #ifdef DEBUG - if ( gtkShMem->message ) dbprintf( 5,"[psignal] main sig handler gtk msg: %d\n",gtkShMem->message ); +// if ( gtkShMem->message ) dbprintf( 5,"[psignal] main sig handler gtk msg: %d\n",gtkShMem->message ); // if ( mplShMem->message ) dbprintf( 5,"[psignal] main sig handler mpl msg: %d\n",mplShMem->message ); // #endif @@ -199,9 +199,7 @@ case evLoad: gtkVisibleFileSelect=0; break; } break; - case evSkinBrowser: - ChangeSkin(); - break; + case evSkinBrowser: mplShMem->SkinChange=1; break; case evFileLoaded: strcpy( mplShMem->Filename,gtkShMem->fs.dir ); strcat( mplShMem->Filename,"/" ); strcat( mplShMem->Filename,gtkShMem->fs.filename ); if ( mplMainAutoPlay ) mplGeneralTimer=1; diff -r e16646a140fd -r 82e77faa7341 mplayer.c --- a/mplayer.c Fri Aug 31 13:05:37 2001 +0000 +++ b/mplayer.c Fri Aug 31 14:16:28 2001 +0000 @@ -583,7 +583,7 @@ mplShMem->Playing= (gui_no_filename) ? 0 : 1; while(mplShMem->Playing!=1){ usleep(20000); - wsHandleEvents();mplTimerHandler(0); // handle GUI timer events + EventHandling(); } if(gui_no_filename){ filename=mplShMem->Filename; @@ -1291,7 +1291,7 @@ } #ifdef HAVE_NEW_GUI if(use_gui){ - wsHandleEvents();mplTimerHandler(0); // handle GUI timer events + EventHandling(); } #endif video_out->check_events(); // check events AST @@ -1329,7 +1329,7 @@ #ifdef HAVE_NEW_GUI if(use_gui){ - wsHandleEvents();mplTimerHandler(0); // handle GUI timer events + EventHandling(); } #endif @@ -1341,7 +1341,7 @@ usec_sleep(1000000*(time_frame-0.002)); #ifdef HAVE_NEW_GUI if(use_gui){ - wsHandleEvents();mplTimerHandler(0); // handle GUI timer events + EventHandling(); } #endif time_frame-=GetRelativeTime(); @@ -1512,7 +1512,7 @@ #endif #ifdef HAVE_NEW_GUI if(use_gui){ - wsHandleEvents();mplTimerHandler(0); // handle GUI timer events + EventHandling(); if(mplShMem->Playing!=2 || (rel_seek_secs || abs_seek_pos)) break; // end of pause or seek } #endif