"}\n";
+void reset_correction(GeometryCorrection *correction)
+{
+ correction->keystone_vertical = 0.0f;
+ correction->curvature_type = 1;
+ correction->curvature_depth = 0.0f;
+ correction->vertical_center = 0.5f;
+ correction->perspective = 1.0f;
+}
+
GeometryCorrection *get_corrections(Display *display)
{
Window root;
target->perspective -= 1.0f/16;
else if(keysym==XK_z)
target->curvature_type = target->curvature_type%2+1;
+ else if(keysym==XK_0)
+ reset_correction(target);
else
break;
corrections[i].monitor_name = (char *)malloc(namelen+1);
strcpy(corrections[i].monitor_name, argv[1]);
corrections[i+1].monitor_name = NULL;
- corrections[i].keystone_vertical = 0.0f;
- corrections[i].curvature_type = 1;
- corrections[i].curvature_depth = 0.0f;
- corrections[i].vertical_center = 0.5f;
- corrections[i].perspective = 1.0f;
+ reset_correction(&corrections[i]);
}
if(argc==2)