Patch by ico2 with changes by Magliocchetti Riccardo:
This fixes compilation issues on 64 bits.
This commit is contained in:
parent
f544b5a7c3
commit
c5c9655da1
|
@ -1106,9 +1106,9 @@ static void GetLine (int line, u16* dst)
|
||||||
g = (g*a + oldg*(255-a)) >> 8;
|
g = (g*a + oldg*(255-a)) >> 8;
|
||||||
b = (b*a + oldb*(255-a)) >> 8;
|
b = (b*a + oldb*(255-a)) >> 8;
|
||||||
|
|
||||||
r=std::min(255ul,r);
|
r=std::min((u32)255,r);
|
||||||
g=std::min(255ul,g);
|
g=std::min((u32)255,g);
|
||||||
b=std::min(255ul,b);
|
b=std::min((u32)255,b);
|
||||||
|
|
||||||
//debug: display alpha channel
|
//debug: display alpha channel
|
||||||
//u32 r = screen3D[t+3];
|
//u32 r = screen3D[t+3];
|
||||||
|
|
|
@ -655,11 +655,15 @@ static bool savestate_save(std::ostream* outstream, int compressionLevel)
|
||||||
int error = Z_OK;
|
int error = Z_OK;
|
||||||
if(compressionLevel != Z_NO_COMPRESSION)
|
if(compressionLevel != Z_NO_COMPRESSION)
|
||||||
{
|
{
|
||||||
|
uLongf comprlen2;
|
||||||
//worst case compression.
|
//worst case compression.
|
||||||
//zlib says "0.1% larger than sourceLen plus 12 bytes"
|
//zlib says "0.1% larger than sourceLen plus 12 bytes"
|
||||||
comprlen = (len>>9)+12 + len;
|
comprlen = (len>>9)+12 + len;
|
||||||
cbuf = new u8[comprlen];
|
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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue