X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcontrol.c;h=fc0f8718c4e554e92dd41f8505b1f8598478d2a5;hb=ba8b1bb54c180503ac90874d950002b025f5b2dd;hp=3ead1e2118a293660716592b802b20a615602b4e;hpb=fcc21bf22fb603e0073cef98dc4ff002bdb7cce7;p=geometrycompositor.git diff --git a/source/control.c b/source/control.c index 3ead1e2..fc0f871 100644 --- a/source/control.c +++ b/source/control.c @@ -154,10 +154,10 @@ GeometryCorrection *get_corrections(Display *display) corrections[i].monitor_name = (char *)malloc(namelen+1); strcpy(corrections[i].monitor_name, name_ptr); - corrections[i].keystone_vertical = values[i*4]/10000.0f; - corrections[i].cylinder_depth = values[i*4+1]/10000.0f; - corrections[i].vertical_center = values[i*4+2]/10000.0f; - corrections[i].perspective = values[i*4+3]/10000.0f; + corrections[i].keystone_vertical = values[i*4]/4096.0f; + corrections[i].cylinder_depth = values[i*4+1]/4096.0f; + corrections[i].vertical_center = values[i*4+2]/4096.0f; + corrections[i].perspective = values[i*4+3]/4096.0f; name_ptr += namelen+1; } @@ -198,10 +198,10 @@ void set_corrections(Display *display, GeometryCorrection *corrections) strcpy(name_ptr, corrections[i].monitor_name); name_ptr += strlen(name_ptr)+1; - values[i*4] = corrections[i].keystone_vertical*10000; - values[i*4+1] = corrections[i].cylinder_depth*10000; - values[i*4+2] = corrections[i].vertical_center*10000; - values[i*4+3] = corrections[i].perspective*10000; + values[i*4] = corrections[i].keystone_vertical*4096; + values[i*4+1] = corrections[i].cylinder_depth*4096; + values[i*4+2] = corrections[i].vertical_center*4096; + values[i*4+3] = corrections[i].perspective*4096; } root = DefaultRootWindow(display); @@ -338,7 +338,7 @@ void update_view(Display *display, InteractiveView *view, XSelectionEvent *event vertex_data = (float *)malloc(nvertices*3*sizeof(float)); for(i=0; inelements = tessellation*((tessellation+1)*2+1)-1; @@ -474,6 +474,10 @@ int main(int argc, char **argv) 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].cylinder_depth = 0.0f; + corrections[i].vertical_center = 0.5f; + corrections[i].perspective = 1.0f; } if(argc==2)