mirror of https://github.com/mpv-player/mpv
bug fixs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3081 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
590886a8f4
commit
a1c02f562c
|
@ -74,9 +74,12 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp )
|
||||||
|
|
||||||
wsCreateWindow( &appMPlayer.subWindow,
|
wsCreateWindow( &appMPlayer.subWindow,
|
||||||
appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height,
|
appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height,
|
||||||
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsShowWindow,"ViDEO" );
|
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"ViDEO" );
|
||||||
|
|
||||||
vo_setwindow(appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC);
|
wsDestroyImage( &appMPlayer.subWindow );
|
||||||
|
wsCreateImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
|
||||||
|
|
||||||
|
vo_setwindow( appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC );
|
||||||
vo_setwindowsize( appMPlayer.sub.width,appMPlayer.sub.height );
|
vo_setwindowsize( appMPlayer.sub.width,appMPlayer.sub.height );
|
||||||
|
|
||||||
i=wsHideFrame|wsMaxSize|wsHideWindow;
|
i=wsHideFrame|wsMaxSize|wsHideWindow;
|
||||||
|
@ -86,7 +89,6 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp )
|
||||||
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,i,"MPlayer" ); //wsMinSize|
|
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,i,"MPlayer" ); //wsMinSize|
|
||||||
|
|
||||||
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
|
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
|
||||||
wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
|
|
||||||
|
|
||||||
mplMenuInit();
|
mplMenuInit();
|
||||||
|
|
||||||
|
@ -106,6 +108,7 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp )
|
||||||
appMPlayer.subWindow.ReSize=mplResize;
|
appMPlayer.subWindow.ReSize=mplResize;
|
||||||
|
|
||||||
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
||||||
|
wsClearWindow( appMPlayer.subWindow );
|
||||||
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
||||||
|
|
||||||
wsPostRedisplay( &appMPlayer.mainWindow );
|
wsPostRedisplay( &appMPlayer.mainWindow );
|
||||||
|
@ -116,12 +119,9 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp )
|
||||||
btnModify( evSetMoviePosition,mplShMem->Position );
|
btnModify( evSetMoviePosition,mplShMem->Position );
|
||||||
|
|
||||||
mplShMem->Playing=0;
|
mplShMem->Playing=0;
|
||||||
|
|
||||||
// timerSetHandler( mplTimerHandler ); // various timer hacks
|
|
||||||
// timerInit();
|
|
||||||
|
|
||||||
// wsMainLoop(); // X event handler (calls mplTimerHandler periodically!)
|
|
||||||
|
|
||||||
|
wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
|
||||||
|
wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
|
||||||
}
|
}
|
||||||
|
|
||||||
void mplDone(){
|
void mplDone(){
|
||||||
|
|
|
@ -112,6 +112,7 @@ int __base( char * in )
|
||||||
unsigned char fname[512];
|
unsigned char fname[512];
|
||||||
unsigned char tmp[512];
|
unsigned char tmp[512];
|
||||||
int x,y;
|
int x,y;
|
||||||
|
int sx=0,sy=0;
|
||||||
|
|
||||||
CHECKDEFLIST( "base" );
|
CHECKDEFLIST( "base" );
|
||||||
CHECKWINLIST( "base" );
|
CHECKWINLIST( "base" );
|
||||||
|
@ -119,8 +120,10 @@ int __base( char * in )
|
||||||
cutItem( in,fname,',',0 );
|
cutItem( in,fname,',',0 );
|
||||||
x=cutItemToInt( in,',',1 );
|
x=cutItemToInt( in,',',1 );
|
||||||
y=cutItemToInt( in,',',2 );
|
y=cutItemToInt( in,',',2 );
|
||||||
|
sx=cutItemToInt( in,',',3 );
|
||||||
|
sy=cutItemToInt( in,',',4 );
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
dbprintf( 3,"\n[skin] base: %s x: %d y: %d\n",fname,x,y );
|
dbprintf( 3,"\n[skin] base: %s x: %d y: %d ( %dx%d )\n",fname,x,y,sx,sy );
|
||||||
#endif
|
#endif
|
||||||
if ( !strcmp( winList,"main" ) )
|
if ( !strcmp( winList,"main" ) )
|
||||||
{
|
{
|
||||||
|
@ -162,6 +165,11 @@ int __base( char * in )
|
||||||
defList->sub.y=y;
|
defList->sub.y=y;
|
||||||
defList->sub.width=defList->sub.Bitmap.Width;
|
defList->sub.width=defList->sub.Bitmap.Width;
|
||||||
defList->sub.height=defList->sub.Bitmap.Height;
|
defList->sub.height=defList->sub.Bitmap.Height;
|
||||||
|
if ( sx && sy )
|
||||||
|
{
|
||||||
|
defList->sub.width=sx;
|
||||||
|
defList->sub.height=sy;
|
||||||
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
dbprintf( 3,"[skin] %d,%d %dx%d\n",defList->sub.x,defList->sub.y,defList->sub.width,defList->sub.height );
|
dbprintf( 3,"[skin] %d,%d %dx%d\n",defList->sub.x,defList->sub.y,defList->sub.width,defList->sub.height );
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue