mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-15 20:01:54 -07:00
Fix switching nsfw mode
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user