Skip to content

Commit

Permalink
Check if maxTextureSize >0 rather than !=-1 (#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
ACrazyTown authored Nov 28, 2024
1 parent 2cca263 commit fb408f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flixel/graphics/FlxGraphic.hx
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ class FlxGraphic implements IFlxDestroyable

#if FLX_OPENGL_AVAILABLE
var max:Int = FlxG.bitmap.maxTextureSize;
if (max != -1)
if (max > 0)
{
if (width > max || height > max)
FlxG.log.warn('Graphic dimensions (${width}x${height}) exceed the maximum allowed size (${max}x${max}), which may cause rendering issues.');
Expand Down

0 comments on commit fb408f1

Please sign in to comment.