1
mirror of https://github.com/mpv-player/mpv synced 2025-05-13 08:49:55 +02:00

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

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

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

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

@ -103,6 +103,7 @@ extern void mplStop();
extern void mplFullScreen( void ); extern void mplFullScreen( void );
extern void mplPlay( void ); extern void mplPlay( void );
extern void mplPause( 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 mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
extern void mplResizeToMovieSize( unsigned int width,unsigned int height ); extern void mplResizeToMovieSize( unsigned int width,unsigned int height );

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

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

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