From 27f17877be7db35e1455a90a67908b577d3add1d Mon Sep 17 00:00:00 2001 From: Rob Purchase Date: Wed, 4 Nov 2009 23:44:27 +0000 Subject: 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 --- apps/screens.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/screens.c b/apps/screens.c index 65ad8c657b..9edda1ad43 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 -- cgit v1.2.3