diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-06-16 17:04:47 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-06-16 17:04:47 +0000 |
commit | b8435f54464fd50c145d321b118d773ea05ef6a2 (patch) | |
tree | a514bbe44e41c454dfca56184376209787c40268 /apps/menus/display_menu.c | |
parent | b1a60934c5d178842ec3bec83a3e5286410cab7d (diff) | |
download | rockbox-b8435f54464fd50c145d321b118d773ea05ef6a2.tar.gz rockbox-b8435f54464fd50c145d321b118d773ea05ef6a2.zip |
Touchscreen targets: add calibration screen + rewrite calibration driver (FS#10295)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21312 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/display_menu.c')
-rw-r--r-- | apps/menus/display_menu.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c index a015be3a23..aee9c1828d 100644 --- a/apps/menus/display_menu.c +++ b/apps/menus/display_menu.c | |||
@@ -36,6 +36,9 @@ | |||
36 | #include "talk.h" | 36 | #include "talk.h" |
37 | #include "lcd.h" | 37 | #include "lcd.h" |
38 | #include "lcd-remote.h" | 38 | #include "lcd-remote.h" |
39 | #ifdef HAVE_TOUCHSCREEN | ||
40 | #include "screens.h" | ||
41 | #endif | ||
39 | 42 | ||
40 | #ifdef HAVE_BACKLIGHT | 43 | #ifdef HAVE_BACKLIGHT |
41 | static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) | 44 | static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) |
@@ -496,6 +499,29 @@ MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON, | |||
496 | /***********************************/ | 499 | /***********************************/ |
497 | 500 | ||
498 | 501 | ||
502 | #ifdef HAVE_TOUCHSCREEN | ||
503 | static int touch_mode_callback(int action,const struct menu_item_ex *this_item) | ||
504 | { | ||
505 | (void)this_item; | ||
506 | switch (action) | ||
507 | { | ||
508 | case ACTION_EXIT_MENUITEM: /* on exit */ | ||
509 | touchscreen_set_mode(global_settings.touch_mode); | ||
510 | break; | ||
511 | } | ||
512 | return action; | ||
513 | } | ||
514 | MENUITEM_SETTING(touch_mode, &global_settings.touch_mode, touch_mode_callback); | ||
515 | |||
516 | MENUITEM_FUNCTION(touchscreen_menu_calibrate, 0, ID2P(LANG_TOUCHSCREEN_CALIBRATE), calibrate, | ||
517 | NULL, NULL, Icon_NOICON); | ||
518 | MENUITEM_FUNCTION(touchscreen_menu_reset_calibration, 0, ID2P(LANG_TOUCHSCREEN_RESET_CALIBRATION), reset_mapping, | ||
519 | NULL, NULL, Icon_NOICON); | ||
520 | |||
521 | MAKE_MENU(touchscreen_menu, ID2P(LANG_TOUCHSCREEN_SETTINGS), NULL, Icon_NOICON, &touch_mode, | ||
522 | &touchscreen_menu_calibrate, &touchscreen_menu_reset_calibration); | ||
523 | #endif | ||
524 | |||
499 | 525 | ||
500 | MENUITEM_SETTING(codepage_setting, &global_settings.default_codepage, NULL); | 526 | MENUITEM_SETTING(codepage_setting, &global_settings.default_codepage, NULL); |
501 | 527 | ||
@@ -511,4 +537,7 @@ MAKE_MENU(display_menu, ID2P(LANG_DISPLAY), | |||
511 | &bars_menu, &peak_meter_menu, | 537 | &bars_menu, &peak_meter_menu, |
512 | #endif | 538 | #endif |
513 | &codepage_setting, | 539 | &codepage_setting, |
540 | #ifdef HAVE_TOUCHSCREEN | ||
541 | &touchscreen_menu, | ||
542 | #endif | ||
514 | ); | 543 | ); |