[Piglit] [PATCH 2/3] gbm: Use libcaca to determine console resolution
Jordan Justen
jordan.l.justen at intel.com
Sun Feb 1 15:34:40 PST 2015
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
tests/util/piglit-framework-gl/piglit_gbm_framework.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/util/piglit-framework-gl/piglit_gbm_framework.c b/tests/util/piglit-framework-gl/piglit_gbm_framework.c
index 581ca99..d6344f8 100644
--- a/tests/util/piglit-framework-gl/piglit_gbm_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_gbm_framework.c
@@ -105,6 +105,15 @@ determine_canvas_size(int *width, int *height)
int columns = 80, rows = 24;
float test_aspect, console_aspect;
const float font_aspect = 0.5;
+ caca_display_t *display;
+
+ display = caca_create_display(NULL);
+ if (display) {
+ caca_canvas_t *canvas = caca_get_canvas(display);
+ columns = caca_get_canvas_width(canvas);
+ rows = caca_get_canvas_height(canvas);
+ caca_free_display(display);
+ }
/* Don't fill the entire window. */
columns--;
--
2.1.4
More information about the Piglit
mailing list