diff --git a/lib/xtreme/assets.c b/lib/xtreme/assets.c index e291d6074..59df1206d 100644 --- a/lib/xtreme/assets.c +++ b/lib/xtreme/assets.c @@ -105,6 +105,7 @@ void XTREME_ASSETS_LOAD() { if(!furi_hal_is_normal_boot()) return; const char* pack = XTREME_SETTINGS()->asset_pack; + XTREME_SETTINGS()->is_nsfw = !strncmp(pack, "NSFW", strlen("NSFW")); if(pack[0] == '\0') return; Storage* storage = furi_record_open(RECORD_STORAGE); diff --git a/lib/xtreme/settings.c b/lib/xtreme/settings.c index f87e30f5f..fb2a48d1b 100644 --- a/lib/xtreme/settings.c +++ b/lib/xtreme/settings.c @@ -43,7 +43,6 @@ void XTREME_SETTINGS_LOAD() { FuriString* string = furi_string_alloc(); if(flipper_format_read_string(file, "asset_pack", string)) { strlcpy(x->asset_pack, furi_string_get_cstr(string), XTREME_ASSETS_PACK_NAME_LEN); - x->is_nsfw = strncmp(x->asset_pack, "NSFW", strlen("NSFW")) == 0; } furi_string_free(string); uint32_t u; diff --git a/lib/xtreme/xtreme.h b/lib/xtreme/xtreme.h index a827730f8..7a30adf8b 100644 --- a/lib/xtreme/xtreme.h +++ b/lib/xtreme/xtreme.h @@ -13,8 +13,9 @@ extern "C" { #define XTREME_ASSETS_PACK_NAME_LEN 32 typedef struct { - char asset_pack[XTREME_ASSETS_PACK_NAME_LEN]; bool is_nsfw; // TODO: replace with packs text support + + char asset_pack[XTREME_ASSETS_PACK_NAME_LEN]; uint32_t anim_speed; int32_t cycle_anims; bool unlock_anims;