mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-08 23:08:10 -07:00
Move is_nsfw to xtreme_assets struct
This commit is contained in:
+5
-1
@@ -9,6 +9,10 @@
|
||||
|
||||
#define ICONS_FMT XTREME_ASSETS_PATH "/%s/Icons/%s"
|
||||
|
||||
XtremeAssets xtreme_assets = {
|
||||
.is_nsfw = false,
|
||||
};
|
||||
|
||||
void load_icon_animated(const Icon* replace, const char* name, FuriString* path, File* file) {
|
||||
const char* pack = xtreme_settings.asset_pack;
|
||||
furi_string_printf(path, ICONS_FMT "/meta", pack, name);
|
||||
@@ -103,7 +107,7 @@ void free_icon(const Icon* icon) {
|
||||
|
||||
void XTREME_ASSETS_LOAD() {
|
||||
const char* pack = xtreme_settings.asset_pack;
|
||||
xtreme_settings.is_nsfw = !strncmp(pack, "NSFW", strlen("NSFW"));
|
||||
xtreme_assets.is_nsfw = !strncmp(pack, "NSFW", strlen("NSFW"));
|
||||
if(pack[0] == '\0') return;
|
||||
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
|
||||
+5
-2
@@ -51,8 +51,6 @@ typedef enum {
|
||||
} UARTChannel;
|
||||
|
||||
typedef struct {
|
||||
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;
|
||||
@@ -91,12 +89,17 @@ typedef struct {
|
||||
UARTChannel uart_general_channel;
|
||||
} XtremeSettings;
|
||||
|
||||
typedef struct {
|
||||
bool is_nsfw; // TODO: replace with packs text support
|
||||
} XtremeAssets;
|
||||
|
||||
void XTREME_SETTINGS_LOAD();
|
||||
void XTREME_SETTINGS_SAVE();
|
||||
extern XtremeSettings xtreme_settings;
|
||||
|
||||
void XTREME_ASSETS_LOAD();
|
||||
void XTREME_ASSETS_FREE();
|
||||
extern XtremeAssets xtreme_assets;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user