Summary
Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Wed 2/3/10 13:04
Recent Commits
>
--git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index fd43149..6451215 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -276,7 +276,7 @@ function pts_hw_string()
$hw_string .= "Motherboard Chipset: " . motherboard_chipset_string() . ", ";
$hw_string .= "System Memory: " . memory_mb_capacity() . "MB, ";
$hw_string .= "Graphics: " . graphics_processor_string() . ", ";
- $hw_string .= "Screen Resolution: " . current_screen_width() . "x" . current_screen_height() . " ";
+ $hw_string .= "Screen Resolution: " . current_screen_resolution() . " ";
return $hw_string;
}
diff --git a/pts-core/functions/pts-functions_linux.php b/pts-core/functions/pts-functions_linux.php
index 5d08edd..6b5385b 100644
--- a/pts-core/functions/pts-functions_linux.php
+++ b/pts-core/functions/pts-functions_linux.php
@@ -90,7 +90,7 @@ function memory_mb_capacity()
return $info;
}
-function current_screen_resolution()
+function xrandr_screen_resolution()
{
$info = shell_exec("xrandr");
@@ -110,14 +110,23 @@ function current_screen_resolution()
}
function current_screen_width()
{
- $resolution = current_screen_resolution();
+ $resolution = xrandr_screen_resolution();
return $resolution[0];
}
function current_screen_height()
{
- $resolution = current_screen_resolution();
+ $resolution = xrandr_screen_resolution();
return $resolution[1];
}
+function current_screen_resolution()
+{
+ if(($width = current_screen_width()) != "Unknown" && ($height = current_screen_height()) != "Unknown")
+ $resolution = $width . "x" . $height;
+ else
+ $resolution = "Unknown";
+
+ return $resolution;
+}
function parse_lsb_output($desc)
{
<
Copyright © 2010 by Phoronix Media