Fix switching nsfw mode

This commit is contained in:
Willy-JL
2023-06-03 22:59:49 +01:00
parent 25eed74201
commit 6c6a481683
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -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);
-1
View File
@@ -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;
+2 -1
View File
@@ -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;