I *think* the problem may be that this code:
+ if (width > screen->maxTextureSize || height > screen->maxTextureSize)
needs to be:
+ if (width >= screen->maxTextureSize || height >= screen->maxTextureSize)
I *think* the problem may be that this code:
+ if (width > screen- >maxTextureSize || height > screen- >maxTextureSize )
needs to be:
+ if (width >= screen- >maxTextureSize || height >= screen- >maxTextureSize )