Patch by ico2 with changes by Magliocchetti Riccardo:

This fixes compilation issues on 64 bits.
This commit is contained in:
yabause 2008-11-09 14:28:15 +00:00
parent f544b5a7c3
commit c5c9655da1
2 changed files with 8 additions and 4 deletions

View File

@ -1106,9 +1106,9 @@ static void GetLine (int line, u16* dst)
g = (g*a + oldg*(255-a)) >> 8;
b = (b*a + oldb*(255-a)) >> 8;
r=std::min(255ul,r);
g=std::min(255ul,g);
b=std::min(255ul,b);
r=std::min((u32)255,r);
g=std::min((u32)255,g);
b=std::min((u32)255,b);
//debug: display alpha channel
//u32 r = screen3D[t+3];

View File

@ -655,11 +655,15 @@ static bool savestate_save(std::ostream* outstream, int compressionLevel)
int error = Z_OK;
if(compressionLevel != Z_NO_COMPRESSION)
{
uLongf comprlen2;
//worst case compression.
//zlib says "0.1% larger than sourceLen plus 12 bytes"
comprlen = (len>>9)+12 + len;
cbuf = new u8[comprlen];
error = compress2(cbuf,&comprlen,(u8*)ms.buf(),len,compressionLevel);
/* Workaround to make it compile under linux 64bit */
comprlen2 = comprlen;
error = compress2(cbuf,&comprlen2,(u8*)ms.buf(),len,compressionLevel);
comprlen = (u32)comprlen2;
}
#endif