Change conditionals according to review

This commit is contained in:
Julian Groß 2020-12-15 04:15:44 +01:00
parent 5e17639bed
commit 0cebb700fb

View file

@ -153,7 +153,7 @@ void GLBackend::init() {
if (vendor.contains("NVIDIA") ) {
qCDebug(gpugllogging) << "NVIDIA card detected";
#if !defined(Q_OS_ANDROID) == !defined(USE_GLES)
#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
GL_GET_INTEGER(GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX);
GL_GET_INTEGER(GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX);
GL_GET_INTEGER(GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX);
@ -170,7 +170,7 @@ void GLBackend::init() {
} else if (vendor.contains("ATI")) {
qCDebug(gpugllogging) << "ATI card detected";
#if !defined(Q_OS_ANDROID) == !defined(USE_GLES)
#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
GL_GET_INTEGER(TEXTURE_FREE_MEMORY_ATI);
#endif
@ -225,12 +225,12 @@ size_t GLBackend::getAvailableMemory() {
switch( _videoCard ) {
case NVIDIA:
#if !defined(Q_OS_ANDROID) == !defined(USE_GLES)
#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &mem[0]);
#endif
return mem[0] * BYTES_PER_KIB;
case ATI:
#if !defined(Q_OS_ANDROID) == !defined(USE_GLES)
#if !defined(Q_OS_ANDROID) && !defined(USE_GLES)
glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, &mem[0]);
#endif
return mem[0] * BYTES_PER_KIB;