From b07364aa3f7a893bb93d48e66f860ce871ee9862 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 25 Oct 2024 15:28:52 +0100 Subject: [PATCH] Update flashcart features --- src/flashcart/64drive/64drive.c | 1 + src/flashcart/flashcart.h | 3 +++ src/flashcart/sc64/sc64.c | 2 ++ src/menu/views/flashcart_info.c | 8 +++++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/flashcart/64drive/64drive.c b/src/flashcart/64drive/64drive.c index 363b3bcf..5b4b5d22 100644 --- a/src/flashcart/64drive/64drive.c +++ b/src/flashcart/64drive/64drive.c @@ -77,6 +77,7 @@ static bool d64_has_feature (flashcart_features_t feature) { case FLASHCART_FEATURE_USB: return true; case FLASHCART_FEATURE_AUTO_CIC: return true; case FLASHCART_FEATURE_AUTO_REGION: return true; + case FLASHCART_FEATURE_SAVE_WRITEBACK: return true; default: return false; } } diff --git a/src/flashcart/flashcart.h b/src/flashcart/flashcart.h index ade09eaa..bd568968 100644 --- a/src/flashcart/flashcart.h +++ b/src/flashcart/flashcart.h @@ -31,6 +31,9 @@ typedef enum { FLASHCART_FEATURE_USB, FLASHCART_FEATURE_AUTO_CIC, FLASHCART_FEATURE_AUTO_REGION, + FLASHCART_FEATURE_BATTERY_HEALTH, + FLASHCART_FEATURE_BIOS_UPDATE_FROM_MENU, + FLASHCART_FEATURE_SAVE_WRITEBACK } flashcart_features_t; /** @brief Flashcart save type enumeration */ diff --git a/src/flashcart/sc64/sc64.c b/src/flashcart/sc64/sc64.c index 927843a3..c0597057 100644 --- a/src/flashcart/sc64/sc64.c +++ b/src/flashcart/sc64/sc64.c @@ -256,6 +256,8 @@ static bool sc64_has_feature (flashcart_features_t feature) { case FLASHCART_FEATURE_USB: return true; case FLASHCART_FEATURE_AUTO_CIC: return true; case FLASHCART_FEATURE_AUTO_REGION: return true; + case FLASHCART_FEATURE_BATTERY_HEALTH: return true; + case FLASHCART_FEATURE_SAVE_WRITEBACK: return true; default: return false; } } diff --git a/src/menu/views/flashcart_info.c b/src/menu/views/flashcart_info.c index 01bfe81f..bf4ddb29 100644 --- a/src/menu/views/flashcart_info.c +++ b/src/menu/views/flashcart_info.c @@ -61,6 +61,9 @@ static void draw (menu_t *menu, surface_t *d) { " USB Debugging: %s.\n" " CIC Detection: %s.\n" " Region Detection: %s.\n" + " Battery Health: %s.\n" + " Save Writeback: %s.\n" + " Update from menu: %s.\n" "\n\n", format_cart_type(), "Not Available", @@ -68,7 +71,10 @@ static void draw (menu_t *menu, surface_t *d) { format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_RTC)), format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_USB)), format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_AUTO_CIC)), - format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_AUTO_REGION)) + format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_AUTO_REGION)), + format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_BATTERY_HEALTH)), + format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_SAVE_WRITEBACK)), + format_boolean_type(flashcart_has_feature(FLASHCART_FEATURE_BIOS_UPDATE_FROM_MENU)) ); component_actions_bar_text_draw(