本文整理汇总了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
}
}
}