mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Fix some pointer type conversion errors in MSVC.
--HG-- branch : minor
This commit is contained in:
@@ -136,11 +136,13 @@ FormatHandler::EncodedImage JPEGHandler::encode(const DecodedImage &img, ImageDa
|
||||
throw love::Exception("Out of memory.");
|
||||
}
|
||||
|
||||
unsigned long jpegSize = tjsize;
|
||||
|
||||
int status = tjCompress2(compressor,
|
||||
img.data,
|
||||
img.width, 0, img.height,
|
||||
TJPF_RGBA,
|
||||
&encodedimage.data, &encodedimage.size,
|
||||
&encodedimage.data, &jpegSize,
|
||||
TJSAMP_444, COMPRESS_QUALITY, TJFLAG_NOREALLOC);
|
||||
|
||||
if (status < 0)
|
||||
@@ -149,6 +151,8 @@ FormatHandler::EncodedImage JPEGHandler::encode(const DecodedImage &img, ImageDa
|
||||
throw love::Exception("Could not encode jpeg image: %s", tjGetErrorStr());
|
||||
}
|
||||
|
||||
encodedimage.size = jpegSize;
|
||||
|
||||
return encodedimage;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ static unsigned zlibDecompress(unsigned char **out, size_t *outsize, const unsig
|
||||
{
|
||||
int status = Z_OK;
|
||||
|
||||
size_t outdataSize = insize;
|
||||
uLongf outdataSize = insize;
|
||||
size_t sizeMultiplier = 0;
|
||||
unsigned char *outdata = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user