From d7bb353d156114e8aa57f10860cd476a7c326c94 Mon Sep 17 00:00:00 2001 From: pontscho Date: Thu, 7 Mar 2002 15:06:02 +0000 Subject: [PATCH] PlayToPause bug with mouse fixed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4980 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/app.c | 7 ++++--- Gui/interface.h | 2 ++ Gui/mplayer/mw.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Gui/app.c b/Gui/app.c index c3535f2fc1..4eb0b371d3 100644 --- a/Gui/app.c +++ b/Gui/app.c @@ -11,6 +11,7 @@ #include "wm/wskeys.h" #include "skin/skin.h" #include "mplayer/mplayer.h" +#include "interface.h" listItems appMPlayer; @@ -27,12 +28,12 @@ void appClearItem( wItem * item ) item->px=0; item->py=0; item->psx=0; item->psy=0; // --- item->msg=0; item->msg2=0; - item->pressed=0; + item->pressed=btnReleased; item->tmp=0; item->key=0; item->key2=0; item->Bitmap.Width=0; item->Bitmap.Height=0; item->Bitmap.BPP=0; item->Bitmap.ImageSize=0; - if ( item->Bitmap.Image ) - { free( item->Bitmap.Image ); item->Bitmap.Image=NULL; } + if ( item->Bitmap.Image ) free( item->Bitmap.Image ); + item->Bitmap.Image=NULL; // --- item->fontid=0; if ( item->label ) free( item->label ); item->label=NULL; diff --git a/Gui/interface.h b/Gui/interface.h index 2c8e16140b..612babfdfc 100644 --- a/Gui/interface.h +++ b/Gui/interface.h @@ -101,6 +101,8 @@ extern guiInterface_t guiIntfStruct; #define guiSetPlay 1 #define guiSetPause 2 +extern char *get_path(char *filename); + extern void guiInit( int argc,char* argv[], char *envp[] ); extern void guiDone( void ); extern void guiGetEvent( int type,char * arg ); diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h index fc39df24ef..c4b5de0a1e 100644 --- a/Gui/mplayer/mw.h +++ b/Gui/mplayer/mw.h @@ -23,7 +23,8 @@ inline void TranslateFilename( int c,char * tmp ) case STREAMTYPE_FILE: if ( ( guiIntfStruct.Filename )&&( guiIntfStruct.Filename[0] ) ) { - strcpy( tmp,guiIntfStruct.Filename ); + if ( strrchr( guiIntfStruct.Filename,'/' ) ) strcpy( tmp,strrchr( guiIntfStruct.Filename,'/' ) + 1 ); + else strcpy( tmp,guiIntfStruct.Filename ); if ( tmp[strlen( tmp ) - 4] == '.' ) tmp[strlen( tmp ) - 4]=0; if ( tmp[strlen( tmp ) - 5] == '.' ) tmp[strlen( tmp ) - 5]=0; } else strcpy( tmp,"no file loaded" );