diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-03-07 19:41:27 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-03-07 19:42:54 -0500 |
commit | c9e8d96e77c9ad3e0ff2df3b1afbac77c33fde85 (patch) | |
tree | 5706c4001882788ab2dc0b352df66d4bcbdc9d08 | |
parent | 7c58b6f0db5afd421c957f66a43ea0a3c972c025 (diff) | |
download | rockbox-c9e8d96e77c9ad3e0ff2df3b1afbac77c33fde85.tar.gz rockbox-c9e8d96e77c9ad3e0ff2df3b1afbac77c33fde85.zip |
ibasso: Fix the dx50/dx90 build (and usb_mode selection)
(The usb_mode selection setting was actually broken even though
it had been previously compiling...)
Change-Id: I0cac31d24c0ef684b934e40ab14f683cc4a31738
-rw-r--r-- | apps/menus/settings_menu.c | 4 | ||||
-rw-r--r-- | apps/settings.c | 11 | ||||
-rw-r--r-- | apps/settings.h | 2 | ||||
-rw-r--r-- | apps/settings_list.c | 5 |
4 files changed, 12 insertions, 10 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 5b96bca6c6..33d29b003c 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -266,7 +266,7 @@ MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON, | |||
266 | &usb_charging, | 266 | &usb_charging, |
267 | #endif | 267 | #endif |
268 | ); | 268 | ); |
269 | #if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR) | 269 | #if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)) |
270 | MENUITEM_SETTING(usb_mode, &global_settings.usb_mode, NULL); | 270 | MENUITEM_SETTING(usb_mode, &global_settings.usb_mode, NULL); |
271 | #endif | 271 | #endif |
272 | /* Disk */ | 272 | /* Disk */ |
@@ -449,7 +449,7 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), | |||
449 | #if defined(DX50) || defined(DX90) | 449 | #if defined(DX50) || defined(DX90) |
450 | &governor, | 450 | &governor, |
451 | #endif | 451 | #endif |
452 | #if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR) | 452 | #if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)) |
453 | &usb_mode, | 453 | &usb_mode, |
454 | #endif | 454 | #endif |
455 | ); | 455 | ); |
diff --git a/apps/settings.c b/apps/settings.c index 8b6db13234..43a010aeb2 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -1021,18 +1021,19 @@ void settings_apply(bool read_disk) | |||
1021 | usb_charging_enable(global_settings.usb_charging); | 1021 | usb_charging_enable(global_settings.usb_charging); |
1022 | #endif | 1022 | #endif |
1023 | 1023 | ||
1024 | #if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR) | ||
1025 | usb_set_mode(global_settings.usb_mode); | ||
1026 | #endif | ||
1027 | |||
1028 | #ifdef HAVE_TOUCHSCREEN | 1024 | #ifdef HAVE_TOUCHSCREEN |
1029 | touchscreen_set_mode(global_settings.touch_mode); | 1025 | touchscreen_set_mode(global_settings.touch_mode); |
1030 | memcpy(&calibration_parameters, &global_settings.ts_calibration_data, sizeof(struct touchscreen_parameter)); | 1026 | memcpy(&calibration_parameters, &global_settings.ts_calibration_data, sizeof(struct touchscreen_parameter)); |
1031 | #endif | 1027 | #endif |
1032 | 1028 | ||
1033 | #if defined(DX50) || defined(DX90) | 1029 | #if defined(DX50) || defined(DX90) |
1034 | ibasso_set_governor(global_settings.governor); | ||
1035 | ibasso_set_usb_mode(global_settings.usb_mode); | 1030 | ibasso_set_usb_mode(global_settings.usb_mode); |
1031 | #elif defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR) | ||
1032 | usb_set_mode(global_settings.usb_mode); | ||
1033 | #endif | ||
1034 | |||
1035 | #if defined(DX50) || defined(DX90) | ||
1036 | ibasso_set_governor(global_settings.governor); | ||
1036 | #endif | 1037 | #endif |
1037 | 1038 | ||
1038 | /* This should stay last */ | 1039 | /* This should stay last */ |
diff --git a/apps/settings.h b/apps/settings.h index 728e10bf30..60f2b44588 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -824,7 +824,7 @@ struct user_settings | |||
824 | #if defined(DX50) || defined(DX90) | 824 | #if defined(DX50) || defined(DX90) |
825 | int governor; | 825 | int governor; |
826 | #endif | 826 | #endif |
827 | #if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR) | 827 | #if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)) |
828 | int usb_mode; | 828 | int usb_mode; |
829 | #endif | 829 | #endif |
830 | }; | 830 | }; |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 40dbdfa152..cf52f26080 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -2161,7 +2161,7 @@ const struct settings_list settings[] = { | |||
2161 | "Powersave", | 2161 | "Powersave", |
2162 | "Performance"), | 2162 | "Performance"), |
2163 | #endif | 2163 | #endif |
2164 | #if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR) | 2164 | #if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)) |
2165 | CHOICE_SETTING(0, | 2165 | CHOICE_SETTING(0, |
2166 | usb_mode, | 2166 | usb_mode, |
2167 | LANG_USB_MODE, | 2167 | LANG_USB_MODE, |
@@ -2172,10 +2172,11 @@ const struct settings_list settings[] = { | |||
2172 | ",adb" | 2172 | ",adb" |
2173 | #endif | 2173 | #endif |
2174 | , | 2174 | , |
2175 | usb_set_mode, | ||
2176 | #if defined(DX50) || defined(DX90) | 2175 | #if defined(DX50) || defined(DX90) |
2176 | ibasso_set_usb_mode, | ||
2177 | 4, | 2177 | 4, |
2178 | #else | 2178 | #else |
2179 | usb_set_mode, | ||
2179 | 3, | 2180 | 3, |
2180 | #endif | 2181 | #endif |
2181 | ID2P(LANG_ASK), | 2182 | ID2P(LANG_ASK), |