1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-28 14:20:05 +00:00

Gui and 64-bit issues patch from Gui and 64-bit issues

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6146 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-05-20 13:39:23 +00:00
parent fb6a3dbf6c
commit c7b919a1b9
5 changed files with 23 additions and 23 deletions

View File

@ -185,8 +185,8 @@ void Convert32to1( txSample * in,txSample * out,int adaptivlimit )
out->Image=(char *)calloc( 1,out->ImageSize ); out->Image=(char *)calloc( 1,out->ImageSize );
if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );
{ {
int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1; int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1;
buf=(unsigned long *)in->Image; buf=(unsigned int *)in->Image;
for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ ) for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ )
{ {
if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128; if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128;
@ -209,8 +209,8 @@ void Convert1to32( txSample * in,txSample * out )
mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize ); mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize );
if ( (int)out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); if ( (int)out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );
{ {
int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0;
buf=(unsigned long *)out->Image; buf=(unsigned int *)out->Image;
for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ ) for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ )
{ {
tmp=in->Image[i]; tmp=in->Image[i];

View File

@ -185,8 +185,8 @@ void Convert32to1( txSample * in,txSample * out,int adaptivlimit )
out->Image=(char *)calloc( 1,out->ImageSize ); out->Image=(char *)calloc( 1,out->ImageSize );
if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );
{ {
int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1; int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1;
buf=(unsigned long *)in->Image; buf=(unsigned int *)in->Image;
for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ ) for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ )
{ {
if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128; if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128;
@ -209,8 +209,8 @@ void Convert1to32( txSample * in,txSample * out )
mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize ); mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize );
if ( (int)out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); if ( (int)out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );
{ {
int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0;
buf=(unsigned long *)out->Image; buf=(unsigned int *)out->Image;
for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ ) for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ )
{ {
tmp=in->Image[i]; tmp=in->Image[i];

View File

@ -9,8 +9,8 @@ void mplHideMenu( int mx,int my,int w );
void mplMenuDraw( wsParamDisplay ) void mplMenuDraw( wsParamDisplay )
{ {
unsigned long * buf = NULL; unsigned int * buf = NULL;
unsigned long * drw = NULL; unsigned int * drw = NULL;
int x,y,tmp; int x,y,tmp;
if ( !appMPlayer.menuBase.Bitmap.Image ) return; if ( !appMPlayer.menuBase.Bitmap.Image ) return;
@ -22,8 +22,8 @@ void mplMenuDraw( wsParamDisplay )
// --- // ---
if ( mplMenuItem != -1 ) if ( mplMenuItem != -1 )
{ {
buf=(unsigned long *)mplMenuDrawBuffer; buf=(unsigned int *)mplMenuDrawBuffer;
drw=(unsigned long *)appMPlayer.menuSelected.Bitmap.Image; drw=(unsigned int *)appMPlayer.menuSelected.Bitmap.Image;
for ( y=appMPlayer.MenuItems[ mplMenuItem ].y; y < appMPlayer.MenuItems[ mplMenuItem ].y + appMPlayer.MenuItems[ mplMenuItem ].height; y++ ) for ( y=appMPlayer.MenuItems[ mplMenuItem ].y; y < appMPlayer.MenuItems[ mplMenuItem ].y + appMPlayer.MenuItems[ mplMenuItem ].height; y++ )
for ( x=appMPlayer.MenuItems[ mplMenuItem ].x; x < appMPlayer.MenuItems[ mplMenuItem ].x + appMPlayer.MenuItems[ mplMenuItem ].width; x++ ) for ( x=appMPlayer.MenuItems[ mplMenuItem ].x; x < appMPlayer.MenuItems[ mplMenuItem ].x + appMPlayer.MenuItems[ mplMenuItem ].width; x++ )
{ {

View File

@ -122,15 +122,15 @@ calclengthmmmmss:
inline void PutImage( txSample * bf,int x,int y,int max,int ofs ) inline void PutImage( txSample * bf,int x,int y,int max,int ofs )
{ {
int i=0,ix,iy; int i=0,ix,iy;
unsigned long * buf = NULL; unsigned int * buf = NULL;
unsigned long * drw = NULL; unsigned int * drw = NULL;
unsigned long tmp; unsigned int tmp;
if ( ( !bf )||( bf->Image == NULL ) ) return; if ( ( !bf )||( bf->Image == NULL ) ) return;
i=( bf->Width * ( bf->Height / max ) ) * ofs; i=( bf->Width * ( bf->Height / max ) ) * ofs;
buf=(unsigned long *)mplDrawBuffer; buf=(unsigned int *)mplDrawBuffer;
drw=(unsigned long *)bf->Image; drw=(unsigned int *)bf->Image;
for ( iy=y;iy < (int)(y+bf->Height / max);iy++ ) for ( iy=y;iy < (int)(y+bf->Height / max);iy++ )
for ( ix=x;ix < (int)(x+bf->Width);ix++ ) for ( ix=x;ix < (int)(x+bf->Width);ix++ )

View File

@ -124,8 +124,8 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... )
txSample tmp2; txSample tmp2;
char p[512]; char p[512];
va_list ap; va_list ap;
unsigned long * ibuf; unsigned int * ibuf;
unsigned long * obuf; unsigned int * obuf;
int i,x,y; int i,x,y;
int oy = 0, ox = 0, dx = 0; int oy = 0, ox = 0, dx = 0;
@ -144,8 +144,8 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... )
tmp->ImageSize=tmp->Width * tmp->Height * 4; tmp->ImageSize=tmp->Width * tmp->Height * 4;
if ( ( tmp->Image=malloc( tmp->ImageSize ) ) == NULL ) return NULL; if ( ( tmp->Image=malloc( tmp->ImageSize ) ) == NULL ) return NULL;
obuf=(unsigned long *)tmp->Image; obuf=(unsigned int *)tmp->Image;
ibuf=(unsigned long *)Fonts[id]->Bitmap.Image; ibuf=(unsigned int *)Fonts[id]->Bitmap.Image;
for ( i=0;i < (int)strlen( p );i++ ) for ( i=0;i < (int)strlen( p );i++ )
{ {
char c = p[i]; char c = p[i];
@ -163,8 +163,8 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... )
tmp2.ImageSize=sx * tmp->Height * 4; tmp2.ImageSize=sx * tmp->Height * 4;
if ( ( tmp2.Image=malloc( tmp2.ImageSize ) ) == NULL ) { free( tmp->Image ); return NULL; } if ( ( tmp2.Image=malloc( tmp2.ImageSize ) ) == NULL ) { free( tmp->Image ); return NULL; }
obuf=(unsigned long *)tmp->Image; obuf=(unsigned int *)tmp->Image;
ibuf=(unsigned long *)tmp2.Image; ibuf=(unsigned int *)tmp2.Image;
oy=0; oy=0;
for ( y=0;y < tmp->Height;y++ ) for ( y=0;y < tmp->Height;y++ )