mirror of
https://github.com/mpv-player/mpv
synced 2025-03-31 15:59:34 +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:
parent
fb6a3dbf6c
commit
c7b919a1b9
@ -185,8 +185,8 @@ void Convert32to1( txSample * in,txSample * out,int adaptivlimit )
|
||||
out->Image=(char *)calloc( 1,out->ImageSize );
|
||||
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;
|
||||
buf=(unsigned long *)in->Image;
|
||||
int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1;
|
||||
buf=(unsigned int *)in->Image;
|
||||
for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ )
|
||||
{
|
||||
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 );
|
||||
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;
|
||||
buf=(unsigned long *)out->Image;
|
||||
int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0;
|
||||
buf=(unsigned int *)out->Image;
|
||||
for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ )
|
||||
{
|
||||
tmp=in->Image[i];
|
||||
|
@ -185,8 +185,8 @@ void Convert32to1( txSample * in,txSample * out,int adaptivlimit )
|
||||
out->Image=(char *)calloc( 1,out->ImageSize );
|
||||
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;
|
||||
buf=(unsigned long *)in->Image;
|
||||
int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1;
|
||||
buf=(unsigned int *)in->Image;
|
||||
for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ )
|
||||
{
|
||||
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 );
|
||||
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;
|
||||
buf=(unsigned long *)out->Image;
|
||||
int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0;
|
||||
buf=(unsigned int *)out->Image;
|
||||
for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ )
|
||||
{
|
||||
tmp=in->Image[i];
|
||||
|
@ -9,8 +9,8 @@ void mplHideMenu( int mx,int my,int w );
|
||||
|
||||
void mplMenuDraw( wsParamDisplay )
|
||||
{
|
||||
unsigned long * buf = NULL;
|
||||
unsigned long * drw = NULL;
|
||||
unsigned int * buf = NULL;
|
||||
unsigned int * drw = NULL;
|
||||
int x,y,tmp;
|
||||
|
||||
if ( !appMPlayer.menuBase.Bitmap.Image ) return;
|
||||
@ -22,8 +22,8 @@ void mplMenuDraw( wsParamDisplay )
|
||||
// ---
|
||||
if ( mplMenuItem != -1 )
|
||||
{
|
||||
buf=(unsigned long *)mplMenuDrawBuffer;
|
||||
drw=(unsigned long *)appMPlayer.menuSelected.Bitmap.Image;
|
||||
buf=(unsigned int *)mplMenuDrawBuffer;
|
||||
drw=(unsigned int *)appMPlayer.menuSelected.Bitmap.Image;
|
||||
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++ )
|
||||
{
|
||||
|
@ -122,15 +122,15 @@ calclengthmmmmss:
|
||||
inline void PutImage( txSample * bf,int x,int y,int max,int ofs )
|
||||
{
|
||||
int i=0,ix,iy;
|
||||
unsigned long * buf = NULL;
|
||||
unsigned long * drw = NULL;
|
||||
unsigned long tmp;
|
||||
unsigned int * buf = NULL;
|
||||
unsigned int * drw = NULL;
|
||||
unsigned int tmp;
|
||||
|
||||
if ( ( !bf )||( bf->Image == NULL ) ) return;
|
||||
|
||||
i=( bf->Width * ( bf->Height / max ) ) * ofs;
|
||||
buf=(unsigned long *)mplDrawBuffer;
|
||||
drw=(unsigned long *)bf->Image;
|
||||
buf=(unsigned int *)mplDrawBuffer;
|
||||
drw=(unsigned int *)bf->Image;
|
||||
|
||||
for ( iy=y;iy < (int)(y+bf->Height / max);iy++ )
|
||||
for ( ix=x;ix < (int)(x+bf->Width);ix++ )
|
||||
|
@ -124,8 +124,8 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... )
|
||||
txSample tmp2;
|
||||
char p[512];
|
||||
va_list ap;
|
||||
unsigned long * ibuf;
|
||||
unsigned long * obuf;
|
||||
unsigned int * ibuf;
|
||||
unsigned int * obuf;
|
||||
int i,x,y;
|
||||
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;
|
||||
if ( ( tmp->Image=malloc( tmp->ImageSize ) ) == NULL ) return NULL;
|
||||
|
||||
obuf=(unsigned long *)tmp->Image;
|
||||
ibuf=(unsigned long *)Fonts[id]->Bitmap.Image;
|
||||
obuf=(unsigned int *)tmp->Image;
|
||||
ibuf=(unsigned int *)Fonts[id]->Bitmap.Image;
|
||||
for ( i=0;i < (int)strlen( 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;
|
||||
if ( ( tmp2.Image=malloc( tmp2.ImageSize ) ) == NULL ) { free( tmp->Image ); return NULL; }
|
||||
|
||||
obuf=(unsigned long *)tmp->Image;
|
||||
ibuf=(unsigned long *)tmp2.Image;
|
||||
obuf=(unsigned int *)tmp->Image;
|
||||
ibuf=(unsigned int *)tmp2.Image;
|
||||
oy=0;
|
||||
|
||||
for ( y=0;y < tmp->Height;y++ )
|
||||
|
Loading…
Reference in New Issue
Block a user