small bugfixes, and kill other warning

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4466 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-02-01 16:34:22 +00:00
parent ca0aea4c2d
commit c6a2fbb7c1
7 changed files with 35 additions and 14 deletions

View File

@ -11,7 +11,7 @@ void mplMenuDraw( wsParamDisplay )
{
unsigned long * buf = NULL;
unsigned long * drw = NULL;
unsigned long x,y,tmp;
int x,y,tmp;
if ( !appMPlayer.menuBase.Bitmap.Image ) return;
if ( !mplMenuRender && !appMPlayer.menuWindow.Visible ) return;

View File

@ -222,8 +222,8 @@ play_dvd_2:
#endif
case evPlay:
case evPlaySwitchToPause:
btnModify( evPlaySwitchToPause,btnDisabled );
btnModify( evPauseSwitchToPlay,btnReleased );
// btnModify( evPlaySwitchToPause,btnDisabled );
// btnModify( evPauseSwitchToPlay,btnReleased );
if ( ( msg == evPlaySwitchToPause )&( mplShMem->Playing == 1 ) ) goto NoPause;
mplMainRender=1;
@ -241,6 +241,7 @@ play_dvd_2:
#endif
}
mplPlay();
mplState();
break;
case evSetDVDSubtitle:
#ifdef USE_DVDREAD
@ -292,10 +293,11 @@ NoPause:
case evStop:
IZE("evStop");
btnModify( evPlaySwitchToPause,btnReleased );
btnModify( evPauseSwitchToPlay,btnDisabled );
// btnModify( evPlaySwitchToPause,btnReleased );
// btnModify( evPauseSwitchToPlay,btnDisabled );
mplMainRender=1;
mplStop();
mplState();
break;
case evLoadPlay:

View File

@ -97,18 +97,33 @@ void mplPause( void )
{
case 1: // playing
mplShMem->Playing=2;
btnModify( evPlaySwitchToPause,btnReleased );
btnModify( evPauseSwitchToPlay,btnDisabled );
// btnModify( evPlaySwitchToPause,btnReleased );
// btnModify( evPauseSwitchToPlay,btnDisabled );
break;
case 2: // paused
case 2: // paused
mplShMem->Playing=1;
btnModify( evPlaySwitchToPause,btnDisabled );
btnModify( evPauseSwitchToPlay,btnReleased );
// btnModify( evPlaySwitchToPause,btnDisabled );
// btnModify( evPauseSwitchToPlay,btnReleased );
break;
}
mplState();
mplSubRender=0;
}
void mplState( void )
{
if ( ( mplShMem->Playing == 0 )||( mplShMem->Playing == 2 ) )
{
btnModify( evPlaySwitchToPause,btnReleased );
btnModify( evPauseSwitchToPlay,btnDisabled );
}
else
{
btnModify( evPlaySwitchToPause,btnDisabled );
btnModify( evPauseSwitchToPlay,btnReleased );
}
}
void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
{
// printf( "----resize---> %dx%d --- \n",width,height );

View File

@ -103,6 +103,7 @@ extern void mplStop();
extern void mplFullScreen( void );
extern void mplPlay( void );
extern void mplPause( void );
extern void mplState( void );
extern void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
extern void mplResizeToMovieSize( unsigned int width,unsigned int height );

View File

@ -4,6 +4,7 @@
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <inttypes.h>
#include "widgets.h"
#include "gtk/menu.h"

View File

@ -42,8 +42,8 @@ typedef struct
Atom wsMotifHints;
unsigned int wsMaxX = 0; // Screen width.
unsigned int wsMaxY = 0; // Screen height.
int wsMaxX = 0; // Screen width.
int wsMaxY = 0; // Screen height.
Display * wsDisplay;
int wsScreen;
@ -103,11 +103,13 @@ inline int wsSearch( Window win );
void wsWindowDecoration( wsTWindow * win,long d )
{
#if 0
MotifWmHints *hints = &wsMotifWmHints;
Atom type;
int format;
unsigned long nitems;
unsigned long bytes_after;
#endif
wsMotifHints=XInternAtom( wsDisplay,"_MOTIF_WM_HINTS",0 );
if ( wsMotifHints == None ) return;

View File

@ -161,8 +161,8 @@ typedef struct
XColor wsColor;
} wsTWindow;
extern unsigned int wsMaxX;
extern unsigned int wsMaxY;
extern int wsMaxX;
extern int wsMaxY;
extern Display * wsDisplay;
extern int wsScreen;