From 8febcb1f60b3e93d93e2bfe42e371d2b61b10fdf Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 15 Nov 2017 15:13:00 +0200 Subject: [PATCH] Fixed: Detecting video mem on ATI cards --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 80b424cba..023997065 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -1195,11 +1195,11 @@ sint CDriverGL::getTotalVideoMemory() const if (_Extensions.ATIMeminfo) { - GLint memoryInKiB = 0; - glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, &memoryInKiB); + GLint params[4]; + glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, params); - nlinfo("3D: GL_TEXTURE_FREE_MEMORY_ATI returned %d KiB", memoryInKiB); - return memoryInKiB; + nlinfo("3D: GL_TEXTURE_FREE_MEMORY_ATI returned %d KiB", params[0]); + return params[0]; } #if defined(NL_OS_WINDOWS)