|
1 | 1 | /* SPDX-FileCopyrightText: 2024 Google LLC */ |
2 | 2 | /* SPDX-License-Identifier: Apache-2.0 */ |
| 3 | +/* SPDX-FileCopyrightText: 2025 Joshua Wise */ |
| 4 | +/* SPDX-License-Identifier: GPL-3.0-or-later */ |
3 | 5 |
|
4 | 6 | #include "settings_factory_reset.h" |
5 | 7 | #include "settings_menu.h" |
|
66 | 68 | #if PLATFORM_ASTERIX || PLATFORM_OBELIX |
67 | 69 | DebuggingItemMotionSensitivity, |
68 | 70 | #endif |
| 71 | +#if PLATFORM_ASTERIX |
| 72 | + DebuggingItemBluetoothLegacy, |
| 73 | +#endif |
69 | 74 | #if CAPABILITY_HAS_DYNAMIC_BACKLIGHT |
70 | 75 | DebuggingItemDynamicBacklightMinThreshold, |
71 | 76 | DebuggingItemDynamicBacklightMaxThreshold, |
@@ -584,6 +589,9 @@ static const char* s_debugging_titles[DebuggingItem_Count] = { |
584 | 589 | #if PLATFORM_ASTERIX || PLATFORM_OBELIX |
585 | 590 | [DebuggingItemMotionSensitivity] = i18n_noop("Motion Sensitivity"), |
586 | 591 | #endif |
| 592 | +#if PLATFORM_ASTERIX |
| 593 | + [DebuggingItemBluetoothLegacy] = i18n_noop("BLE compat mode"), |
| 594 | +#endif |
587 | 595 | #if CAPABILITY_HAS_DYNAMIC_BACKLIGHT |
588 | 596 | [DebuggingItemDynamicBacklightMinThreshold] = i18n_noop("Dyn BL Min Threshold"), |
589 | 597 | [DebuggingItemDynamicBacklightMaxThreshold] = i18n_noop("Dyn BL Max Threshold"), |
@@ -619,6 +627,11 @@ static void prv_debugging_draw_row_callback(GContext* ctx, const Layer *cell_lay |
619 | 627 | subtitle_text = i18n_get(s_motion_sensitivity_labels[prv_motion_sensitivity_get_selection_index()], data); |
620 | 628 | } |
621 | 629 | #endif |
| 630 | +#if PLATFORM_ASTERIX |
| 631 | + else if (cell_index->row == DebuggingItemBluetoothLegacy) { |
| 632 | + subtitle_text = shell_prefs_bluetooth_legacy_compat() ? i18n_get("Emulate silk", data) : i18n_get("Disabled", data); |
| 633 | + } |
| 634 | +#endif |
622 | 635 | #if CAPABILITY_HAS_DYNAMIC_BACKLIGHT |
623 | 636 | else if (cell_index->row == DebuggingItemDynamicBacklightMinThreshold) { |
624 | 637 | uint32_t min_threshold = backlight_get_dynamic_min_threshold(); |
@@ -669,6 +682,11 @@ static void prv_debugging_select_callback(MenuLayer *menu_layer, |
669 | 682 | prv_motion_sensitivity_menu_push(data); |
670 | 683 | break; |
671 | 684 | #endif |
| 685 | +#if PLATFORM_ASTERIX |
| 686 | + case DebuggingItemBluetoothLegacy: |
| 687 | + shell_prefs_set_bluetooth_legacy_compat(!shell_prefs_bluetooth_legacy_compat()); |
| 688 | + break; |
| 689 | +#endif |
672 | 690 | #if CAPABILITY_HAS_DYNAMIC_BACKLIGHT |
673 | 691 | case DebuggingItemDynamicBacklightMinThreshold: |
674 | 692 | prv_dyn_bl_min_threshold_menu_push(data); |
|
0 commit comments