bool CalibratorXorgPrint::finish_data(const XYinfo new_axys) { bool success = true; printf("\t--> Making the calibration permanent <--\n"); switch (output_type) { case OUTYPE_AUTO: // xorg.conf.d or alternatively hal config if (has_xorgconfd_support()) { success &= output_xorgconfd(new_axys); } else { success &= output_hal(new_axys); } break; case OUTYPE_XORGCONFD: success &= output_xorgconfd(new_axys); break; case OUTYPE_HAL: success &= output_hal(new_axys); break; default: fprintf(stderr, "ERROR: XorgPrint Calibrator does not support the supplied --output-type\n"); success = false; } return success; }
// Activate calibrated data and output it bool CalibratorEvdev::finish_data(const XYinfo &new_axys) { bool success = true; printf("\nDoing dynamic recalibration:\n"); // Evdev Axes Swap if (old_axys.swap_xy != new_axys.swap_xy) { success &= set_swapxy(new_axys.swap_xy); } #if 0 // Evdev Axis Inversion if (old_axys.x.invert != new_axys.x.invert || old_axys.y.invert != new_axys.y.invert) { success &= set_invert_xy(new_axys.x.invert, new_axys.y.invert); } #endif // Evdev Axis Calibration success &= set_calibration(new_axys); // Evdev Axis Inversion if (old_axys.x.invert != new_axys.x.invert || old_axys.y.invert != new_axys.y.invert) { success &= set_invert_xy(new_axys.x.invert, new_axys.y.invert); } // close XSync(display, False); printf("\t--> Making the calibration permanent <--\n"); switch (output_type) { case OUTYPE_AUTO: // xorg.conf.d or alternatively xinput commands if (has_xorgconfd_support()) { success &= output_xorgconfd(new_axys); } else { success &= output_xinput(new_axys); } break; case OUTYPE_XORGCONFD: success &= output_xorgconfd(new_axys); break; case OUTYPE_HAL: success &= output_hal(new_axys); break; case OUTYPE_XINPUT: success &= output_xinput(new_axys); break; default: fprintf(stderr, "ERROR: Evdev Calibrator does not support the supplied --output-type\n"); success = false; } return success; }