mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-03-13 11:43:29 +00:00
don't resample a texture when the output size is 0xN or Nx0
This commit is contained in:
parent
6e345718c4
commit
de79e1433d
1 changed files with 2 additions and 0 deletions
|
@ -1036,6 +1036,8 @@ GL_ResampleTexture (unsigned int *in, int inwidth, int inheight,
|
||||||
unsigned int *inrow;
|
unsigned int *inrow;
|
||||||
unsigned int frac, fracstep;
|
unsigned int frac, fracstep;
|
||||||
|
|
||||||
|
if (!outwidth || !outheight)
|
||||||
|
return;
|
||||||
fracstep = inwidth * 0x10000 / outwidth;
|
fracstep = inwidth * 0x10000 / outwidth;
|
||||||
for (i = 0; i < outheight; i++, out += outwidth) {
|
for (i = 0; i < outheight; i++, out += outwidth) {
|
||||||
inrow = in + inwidth * (i * inheight / outheight);
|
inrow = in + inwidth * (i * inheight / outheight);
|
||||||
|
|
Loading…
Reference in a new issue