ref: 56da7dfe99f70d4643589dd8b5fbb6ce29d5c28f
parent: aafb8dd30238073bf86b42a33565d2f8512cbdfa
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Oct 14 15:47:10 EDT 2020
3DS - Slight optimisation
--- a/src/Backends/Rendering/3DS.cpp
+++ b/src/Backends/Rendering/3DS.cpp
@@ -358,11 +358,11 @@
{
RenderBackend_GlyphAtlas *atlas = (RenderBackend_GlyphAtlas*)malloc(sizeof(RenderBackend_GlyphAtlas));
- width = RoundUpToPowerOfTwo(width);
- height = RoundUpToPowerOfTwo(height);
-
if (atlas != NULL)
{
+ width = RoundUpToPowerOfTwo(width);
+ height = RoundUpToPowerOfTwo(height);
+
atlas->local_texture_buffer = (unsigned char*)linearAlloc(width * height * 4);
if (atlas->local_texture_buffer != NULL)