mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 11:01:36 +00:00
- fixed: the direct native GetTextureSize used the wrong calling convention.
This commit is contained in:
parent
e5fa48ae79
commit
a7913e9ba9
1 changed files with 3 additions and 3 deletions
|
@ -1244,7 +1244,7 @@ DEFINE_ACTION_FUNCTION(_TexMan, GetName)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
static void GetTextureSize(int texid, int *px, int *py)
|
||||
static int GetTextureSize(int texid, int *py)
|
||||
{
|
||||
auto tex = TexMan.ByIndex(texid);
|
||||
int x, y;
|
||||
|
@ -1254,8 +1254,8 @@ static void GetTextureSize(int texid, int *px, int *py)
|
|||
y = tex->GetHeight();
|
||||
}
|
||||
else x = y = -1;
|
||||
if (px) *px = x;
|
||||
if (py) *py = y;
|
||||
return x;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, GetSize, GetTextureSize)
|
||||
|
@ -1263,7 +1263,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, GetSize, GetTextureSize)
|
|||
PARAM_PROLOGUE;
|
||||
PARAM_INT(texid);
|
||||
int x, y;
|
||||
GetTextureSize(texid, &x, &y);
|
||||
x = GetTextureSize(texid, &y);
|
||||
if (numret > 0) ret[0].SetInt(x);
|
||||
if (numret > 1) ret[1].SetInt(y);
|
||||
return MIN(numret, 2);
|
||||
|
|
Loading…
Reference in a new issue