summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Ritger <aritger@nvidia.com>2017-10-10 22:07:29 -0700
committerAaron Plattner <aplattner@nvidia.com>2018-01-04 10:10:21 -0800
commit554b47144aff1c9ab25ac14e33219a29167e13d5 (patch)
tree7cf7fffb7178fb22f18d26d74580362e76d24325
parent9a680076bbe11c79e650425b95c17e969c010dfe (diff)
nvctrl samples: Add "--blend-after-warp" option to nv-control-warpblend
-rw-r--r--samples/nv-control-warpblend.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/samples/nv-control-warpblend.c b/samples/nv-control-warpblend.c
index d15c956..abe186f 100644
--- a/samples/nv-control-warpblend.c
+++ b/samples/nv-control-warpblend.c
@@ -70,6 +70,7 @@ int main(int ac, char **av)
Pixmap blendPixmap;
vertexDataRec warpData[6];
int nvDpyId;
+ Bool blendAfterWarp = False;
if (!xDpy) {
fprintf (stderr, "Could not open X Display %s!\n", XDisplayName(NULL));
@@ -78,12 +79,16 @@ int main(int ac, char **av)
screenId = XDefaultScreen(xDpy);
- if (ac != 2) {
- fprintf (stderr, "Usage: ./nv-control-warpblend nvDpyId\n");
+ if ((ac != 2) && (ac != 3)) {
+ fprintf (stderr, "Usage: ./nv-control-warpblend nvDpyId [--blend-after-warp]\n");
fprintf (stderr, "See 'nvidia-settings -q CurrentMetaMode' for currently connected DPYs.\n");
return 1;
}
+ if (ac == 3) {
+ blendAfterWarp = (strcmp("--blend-after-warp", av[2]) == 0);
+ }
+
nvDpyId = atoi(av[1]);
// Start with two screen-aligned triangles, and warp them using the sample
@@ -166,7 +171,7 @@ int main(int ac, char **av)
screenId,
nvDpyId,
blendPixmap,
- False);
+ blendAfterWarp);
return 0;
}