diff options
| author | Rob Purchase <shotofadds@rockbox.org> | 2009-11-04 23:44:27 +0000 |
|---|---|---|
| committer | Rob Purchase <shotofadds@rockbox.org> | 2009-11-04 23:44:27 +0000 |
| commit | 27f17877be7db35e1455a90a67908b577d3add1d (patch) | |
| tree | c9f1700252f7ed2b448044b1ce3e57b9deed4847 /apps | |
| parent | 06e0bfddad5fbc3d5944fe7f52952f6726b43651 (diff) | |
| download | rockbox-27f17877be7db35e1455a90a67908b577d3add1d.zip rockbox-27f17877be7db35e1455a90a67908b577d3add1d.tar.gz rockbox-27f17877be7db35e1455a90a67908b577d3add1d.tar.bz2 rockbox-27f17877be7db35e1455a90a67908b577d3add1d.tar.xz | |
Ensure touchscreen calibration setting is saved after change or reset.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23529 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/screens.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/screens.c b/apps/screens.c index 65ad8c6..9edda1a 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -908,6 +908,7 @@ int calibrate(void) touchscreen_disable_mapping(); /* set raw mode */ touchscreen_set_mode(TOUCHSCREEN_POINT); + for(i=0; i<3; i++) { screen->clear_display(); @@ -923,17 +924,25 @@ int calibrate(void) touchscreen_calibrate(&cal); else touchscreen_reset_mapping(); - memcpy(&global_settings.ts_calibration_data, &calibration_parameters, sizeof(struct touchscreen_parameter)); + + memcpy(&global_settings.ts_calibration_data, &calibration_parameters, + sizeof(struct touchscreen_parameter)); + touchscreen_set_mode(old_mode); global_settings.statusbar = statusbar; + settings_save(); return ret; } int reset_mapping(void) { touchscreen_reset_mapping(); - memcpy(&global_settings.ts_calibration_data, &calibration_parameters, sizeof(struct touchscreen_parameter)); + + memcpy(&global_settings.ts_calibration_data, &calibration_parameters, + sizeof(struct touchscreen_parameter)); + + settings_save(); return 0; } #endif |