Browse Source

Fix false-positive AMD/NVidia driver detection on OSX.

Apple has its own drivers but still names the vendor the same way as if it
were the Windows/Linux binary drivers. Weird and/or sneaky.
pull/132/head
Vladimír Vondruš 10 years ago
parent
commit
b52d0e345d
  1. 2
      src/Magnum/Context.h
  2. 3
      src/Magnum/Implementation/driverSpecific.cpp

2
src/Magnum/Context.h

@ -212,7 +212,7 @@ class MAGNUM_EXPORT Context {
#endif
#ifndef MAGNUM_TARGET_WEBGL
/** Binary NVidia drivers */
/** Binary NVidia drivers on Windows and Linux */
NVidia = 1 << 2,
#endif

3
src/Magnum/Implementation/driverSpecific.cpp

@ -115,6 +115,8 @@ auto Context::detectedDriver() -> DetectedDrivers {
const std::string vendor = vendorString();
/* Apple has its own drivers */
#ifndef CORRADE_TARGET_APPLE
#ifndef MAGNUM_TARGET_GLES
/* AMD binary desktop drivers */
if(vendor.find("ATI Technologies Inc.") != std::string::npos)
@ -131,6 +133,7 @@ auto Context::detectedDriver() -> DetectedDrivers {
if(vendor.find("NVIDIA Corporation") != std::string::npos)
return *_detectedDrivers |= DetectedDriver::NVidia;
#endif
#endif
/** @todo there is also D3D9/D3D11 distinction on webglreport.com, is it useful? */
#ifdef MAGNUM_TARGET_GLES

Loading…
Cancel
Save