本文整理匯總了PHP中phodevi::set_property方法的典型用法代碼示例。如果您正苦於以下問題:PHP phodevi::set_property方法的具體用法?PHP phodevi::set_property怎麽用?PHP phodevi::set_property使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phodevi
的用法示例。
在下文中一共展示了phodevi::set_property方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __post_test_run
public static function __post_test_run(&$test_result)
{
if ($test_result->test_profile->get_test_hardware_type() != 'Graphics') {
return;
}
// Check for video resolution changes
// Access the xrandr resolution directly to ensure it's not polling the FB size or one of the KMS modes
$current_res = phodevi_gpu::gpu_xrandr_resolution();
if ($current_res != self::$start_video_resolution && self::$start_video_resolution != array(-1, -1)) {
$video_width = $current_res[0];
$video_height = $current_res[1];
$reset = self::$start_video_resolution;
$reset_width = $reset[0];
$reset_height = $reset[1];
// echo '\nThe video resolution had changed during testing and it was not properly reset! Now resetting to $reset_width x $reset_height from $video_width x $video_height.\n';
phodevi::set_property('gpu', 'screen-resolution', array($reset_width, $reset_height));
// Sleep for three seconds to allow time for display to settle after mode-set
sleep(3);
}
if (phodevi::is_nvidia_graphics()) {
$current_error_position = self::nvidia_gpu_error_count();
if ($current_error_position > self::$error_pointer && $test_result instanceof pts_test_result) {
// GPU Error(s) Happened During The Test
$this_test = $test_result->test_profile->get_identifier();
$this_error_count = $current_error_position - self::$error_pointer;
if (isset(self::$error_analysis[$this_test])) {
$this_error_count += self::$error_analysis[$this_test];
}
self::$error_analysis[$this_test] = $this_error_count;
// Tally up errors for this test
self::$error_count += $this_error_count;
// Add to total error count
self::$error_pointer = $current_error_position;
// Reset the pointer
}
}
}