summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2007-12-14 22:43:05 +0100
committerBenjamin Otte <otte@gnome.org>2007-12-14 22:43:05 +0100
commit9463698500814477ddb82eb3212cf21c23129050 (patch)
treece10fdbbb9b54cd15418f89212e2cce5ef52134b
parent114ee10250c7559048b526b6887278b87548c353 (diff)
add --primary to force rendering on the primary display
-rw-r--r--test/bench.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bench.c b/test/bench.c
index e566f00..7b17918 100644
--- a/test/bench.c
+++ b/test/bench.c
@@ -47,9 +47,11 @@ main (int argc, char *argv[])
int total = 0;
/* config variables */
int seconds = 10000;
+ gboolean primary = FALSE;
gboolean verbose = FALSE;
GOptionEntry options[] = {
+ { "primary", 'p', 0, G_OPTION_ARG_NONE, &primary, "use the primary display", NULL },
{ "time", 't', 0, G_OPTION_ARG_INT, &seconds, "number of milliseconds to advance (default: 10.000)", "mSECS" },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "be verbose", NULL },
{ NULL }
@@ -86,6 +88,10 @@ main (int argc, char *argv[])
dsc.flags = DSDESC_WIDTH | DSDESC_HEIGHT;
dsc.width = w;
dsc.height = h;
+ if (primary) {
+ dsc.flags |= DSDESC_CAPS;
+ dsc.caps = DSCAPS_PRIMARY;
+ }
ERROR_CHECK (dfb->CreateSurface (dfb, &dsc, &surface));
renderer = swfdec_dfb_renderer_new (dfb, surface, player);