diff options
-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 65ad8c657b..9edda1ad43 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -908,6 +908,7 @@ int calibrate(void) | |||
908 | 908 | ||
909 | touchscreen_disable_mapping(); /* set raw mode */ | 909 | touchscreen_disable_mapping(); /* set raw mode */ |
910 | touchscreen_set_mode(TOUCHSCREEN_POINT); | 910 | touchscreen_set_mode(TOUCHSCREEN_POINT); |
911 | |||
911 | for(i=0; i<3; i++) | 912 | for(i=0; i<3; i++) |
912 | { | 913 | { |
913 | screen->clear_display(); | 914 | screen->clear_display(); |
@@ -923,17 +924,25 @@ int calibrate(void) | |||
923 | touchscreen_calibrate(&cal); | 924 | touchscreen_calibrate(&cal); |
924 | else | 925 | else |
925 | touchscreen_reset_mapping(); | 926 | touchscreen_reset_mapping(); |
926 | memcpy(&global_settings.ts_calibration_data, &calibration_parameters, sizeof(struct touchscreen_parameter)); | 927 | |
928 | memcpy(&global_settings.ts_calibration_data, &calibration_parameters, | ||
929 | sizeof(struct touchscreen_parameter)); | ||
930 | |||
927 | touchscreen_set_mode(old_mode); | 931 | touchscreen_set_mode(old_mode); |
928 | global_settings.statusbar = statusbar; | 932 | global_settings.statusbar = statusbar; |
929 | 933 | ||
934 | settings_save(); | ||
930 | return ret; | 935 | return ret; |
931 | } | 936 | } |
932 | 937 | ||
933 | int reset_mapping(void) | 938 | int reset_mapping(void) |
934 | { | 939 | { |
935 | touchscreen_reset_mapping(); | 940 | touchscreen_reset_mapping(); |
936 | memcpy(&global_settings.ts_calibration_data, &calibration_parameters, sizeof(struct touchscreen_parameter)); | 941 | |
942 | memcpy(&global_settings.ts_calibration_data, &calibration_parameters, | ||
943 | sizeof(struct touchscreen_parameter)); | ||
944 | |||
945 | settings_save(); | ||
937 | return 0; | 946 | return 0; |
938 | } | 947 | } |
939 | #endif | 948 | #endif |