summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_config.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-07-09 20:33:53 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-03 11:49:19 -0400
commitd1859e3ea218e4a805f3b9434426cefc624b34e0 (patch)
treef8244a221863b7b890e66f0143b2151098c16536 /pts-core/functions/pts-functions_config.php
parentf86912d007428af329be6f51b6d4ae47beb365c3 (diff)
downloadphoronix-test-suite-upstream-d1859e3ea218e4a805f3b9434426cefc624b34e0.tar.gz
phoronix-test-suite-upstream-d1859e3ea218e4a805f3b9434426cefc624b34e0.tar.xz
phoronix-test-suite-upstream-d1859e3ea218e4a805f3b9434426cefc624b34e0.zip
pts-core: Add IS_NVIDIA_GRAPHICS, IS_ATI_GRAPHICS, and IS_MESA_GRAPHICS
defines for boolean types of graphics card / driver being used
Diffstat (limited to 'pts-core/functions/pts-functions_config.php')
-rw-r--r--pts-core/functions/pts-functions_config.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_config.php b/pts-core/functions/pts-functions_config.php
index 61ec6e8..f86f44d 100644
--- a/pts-core/functions/pts-functions_config.php
+++ b/pts-core/functions/pts-functions_config.php
@@ -38,6 +38,15 @@ function pts_extended_init()
mkdir(PTS_DOWNLOAD_CACHE_DIR);
file_put_contents(PTS_DOWNLOAD_CACHE_DIR . "make-cache-howto", "A download cache is used for conserving time and bandwidth by eliminating the need for the Phoronix Test Suite to download files that have already been downloaded once. A download cache can also be transferred between PCs running the Phoronix Test Suite. For more information on this feature, view the included documentation. To generate a download cache, run:\n\nphoronix-test-suite make-download-cache\n");
}
+
+ $opengl_driver = opengl_version();
+
+ if(strpos($opengl_driver, "NVIDIA") !== FALSE)
+ define("IS_NVIDIA_GRAPHICS", true);
+ else if(strpos($opengl_driver, "fglrx") !== FALSE)
+ define("IS_ATI_GRAPHICS", true);
+ else if(strpos($opengl_driver, "Mesa") !== FALSE)
+ define("IS_MESA_GRAPHICS", true);
}
function pts_user_config_init($UserName = NULL, $UploadKey = NULL, $BatchOptions = NULL)
{