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
This commit is contained in:
parent
7c58b6f0db
commit
c9e8d96e77
4 changed files with 12 additions and 10 deletions
|
@ -266,7 +266,7 @@ MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON,
|
|||
&usb_charging,
|
||||
#endif
|
||||
);
|
||||
#if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)
|
||||
#if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR))
|
||||
MENUITEM_SETTING(usb_mode, &global_settings.usb_mode, NULL);
|
||||
#endif
|
||||
/* Disk */
|
||||
|
@ -449,7 +449,7 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
|
|||
#if defined(DX50) || defined(DX90)
|
||||
&governor,
|
||||
#endif
|
||||
#if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)
|
||||
#if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR))
|
||||
&usb_mode,
|
||||
#endif
|
||||
);
|
||||
|
|
|
@ -1021,18 +1021,19 @@ void settings_apply(bool read_disk)
|
|||
usb_charging_enable(global_settings.usb_charging);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)
|
||||
usb_set_mode(global_settings.usb_mode);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
touchscreen_set_mode(global_settings.touch_mode);
|
||||
memcpy(&calibration_parameters, &global_settings.ts_calibration_data, sizeof(struct touchscreen_parameter));
|
||||
#endif
|
||||
|
||||
#if defined(DX50) || defined(DX90)
|
||||
ibasso_set_governor(global_settings.governor);
|
||||
ibasso_set_usb_mode(global_settings.usb_mode);
|
||||
#elif defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)
|
||||
usb_set_mode(global_settings.usb_mode);
|
||||
#endif
|
||||
|
||||
#if defined(DX50) || defined(DX90)
|
||||
ibasso_set_governor(global_settings.governor);
|
||||
#endif
|
||||
|
||||
/* This should stay last */
|
||||
|
|
|
@ -824,7 +824,7 @@ struct user_settings
|
|||
#if defined(DX50) || defined(DX90)
|
||||
int governor;
|
||||
#endif
|
||||
#if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)
|
||||
#if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR))
|
||||
int usb_mode;
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -2161,7 +2161,7 @@ const struct settings_list settings[] = {
|
|||
"Powersave",
|
||||
"Performance"),
|
||||
#endif
|
||||
#if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)
|
||||
#if defined(DX50) || defined(DX90) || (defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR))
|
||||
CHOICE_SETTING(0,
|
||||
usb_mode,
|
||||
LANG_USB_MODE,
|
||||
|
@ -2172,10 +2172,11 @@ const struct settings_list settings[] = {
|
|||
",adb"
|
||||
#endif
|
||||
,
|
||||
usb_set_mode,
|
||||
#if defined(DX50) || defined(DX90)
|
||||
ibasso_set_usb_mode,
|
||||
4,
|
||||
#else
|
||||
usb_set_mode,
|
||||
3,
|
||||
#endif
|
||||
ID2P(LANG_ASK),
|
||||
|
|
Loading…
Reference in a new issue