• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Revision9dbf13316a96768149a6d9c09ce2afa705bec74c (tree)
Time2010-08-16 06:52:23
AuthorTias Guns <tias@ulys...>
CommiterTias Guns

Log Message

clean up explanation of making calibration permanent for evdev

No hal policy file because older evdevs can not be set using a config, and newer ones will be bundled with xorg.conf.d support

Change Summary

Incremental Difference

--- a/src/calibrator/calibratorEvdev.cpp
+++ b/src/calibrator/calibratorEvdev.cpp
@@ -213,27 +213,30 @@ bool CalibratorEvdev::finish_data(const XYinfo new_axys, int swap_xy)
213213 XSync(display, False);
214214
215215
216- // on stdout: ways to make calibration permanent
217- printf("\n\n== Saving the calibration ==\n");
218- // create startup script
219- printf("If you have the 'xinput' tool installed, a simple way is to create a script that starts with your X session, containing the following command(s):\n");
220- printf(" xinput set-int-prop \"%s\" \"Evdev Axis Calibration\" 32 %d %d %d %d\n", device_name, new_axys.x_min, new_axys.x_max, new_axys.y_min, new_axys.y_max);
221- if (swap_xy)
222- printf(" xinput set-int-prop \"%s\" \"Evdev Axes Swap\" 8 %d\n", device_name, new_swap_xy);
223- printf("See scripts/xinput_calibrator_pointercal.sh for an example used on mobile devices\n");
216+ // TODO: detect which are applicable at runtime/in the makefile ?
217+ printf("\n\n--> How to make the calibration permanent <--\n");
218+ printf("On recent systems you can create an xorg.conf.d snippet, on older systems you have to create a script with the xinput commands:\n\n");
224219
225220 // xorg.conf.d snippet
226- printf("\nxorg.conf.d snippet (RECOMMENDED): copy the snippet below into /etc/X11/xorg.conf.d/99-calibration.conf\n");
221+ printf("* xorg.conf.d snippet (RECOMMENDED)\n");
222+ printf(" copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'\n");
227223 printf("Section \"InputClass\"\n");
228224 printf(" Identifier \"calibration\"\n");
229225 printf(" MatchProduct \"%s\"\n", device_name);
230226 printf(" Option \"Calibration\" \"%d %d %d %d\"\n",
231227 new_axys.x_min, new_axys.x_max, new_axys.y_min, new_axys.y_max);
232- if (swap_xy)
228+ if (swap_xy != 0)
233229 printf(" Option \"SwapAxes\" \"%d\"\n", new_swap_xy);
234230 printf("EndSection\n");
235231 printf("\n");
236232
233+ // create startup script
234+ printf("* xinput commands (for older systems)\n");
235+ printf(" Install the 'xinput' tool and copy the command(s) below in a script that starts with your X session\n");
236+ printf(" xinput set-int-prop \"%s\" \"Evdev Axis Calibration\" 32 %d %d %d %d\n", device_name, new_axys.x_min, new_axys.x_max, new_axys.y_min, new_axys.y_max);
237+ if (swap_xy)
238+ printf(" xinput set-int-prop \"%s\" \"Evdev Axes Swap\" 8 %d\n", device_name, new_swap_xy);
239+
237240 return success;
238241 }
239242