mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Correctly return the output patch's size in Picture_PatchConvert
This commit is contained in:
parent
0e62cb2ada
commit
63e471d902
1 changed files with 9 additions and 3 deletions
|
@ -352,20 +352,26 @@ void *Picture_PatchConvert(
|
|||
img = Z_Malloc(size, PU_STATIC, NULL);
|
||||
memcpy(img, imgbuf, size);
|
||||
|
||||
if (outsize != NULL)
|
||||
*outsize = size;
|
||||
|
||||
if (Picture_IsInternalPatchFormat(outformat))
|
||||
{
|
||||
patch_t *converted = Patch_Create((softwarepatch_t *)img, size, NULL);
|
||||
|
||||
#ifdef HWRENDER
|
||||
Patch_CreateGL(converted);
|
||||
#endif
|
||||
|
||||
Z_Free(img);
|
||||
|
||||
if (outsize != NULL)
|
||||
*outsize = sizeof(patch_t);
|
||||
return converted;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (outsize != NULL)
|
||||
*outsize = size;
|
||||
return img;
|
||||
}
|
||||
}
|
||||
|
||||
/** Converts a picture to a flat.
|
||||
|
|
Loading…
Reference in a new issue