Jelajahi Sumber

NFC Maker: Fix build with OFW FBT

Willy-JL 9 bulan lalu
induk
melakukan
d3ad1cafe7
3 mengubah file dengan 9 tambahan dan 8 penghapusan
  1. 5 6
      nfc_maker/dropin/text_input.c
  2. 2 0
      nfc_maker/dropin/text_input.h
  3. 2 2
      nfc_maker/nfc_maker.h

+ 5 - 6
nfc_maker/dropin/text_input.c

@@ -1,9 +1,6 @@
-#ifndef FW_ORIGIN_Momentum
 #include "text_input.h"
-#include <gui/elements.h>
-#if __has_include(<assets_icons.h>)
-#include <assets_icons.h>
-#else
+
+#ifndef FW_ORIGIN_Momentum
 extern const Icon I_KeySaveSelected_22x11;
 extern const Icon I_KeySave_22x11;
 extern const Icon I_KeyKeyboardSelected_10x11;
@@ -11,7 +8,8 @@ extern const Icon I_KeyKeyboard_10x11;
 extern const Icon I_KeyBackspaceSelected_17x11;
 extern const Icon I_KeyBackspace_17x11;
 extern const Icon I_WarningDolphin_45x42;
-#endif
+
+#include <gui/elements.h>
 #include <furi.h>
 
 struct TextInput {
@@ -805,4 +803,5 @@ void text_input_set_header_text(TextInput* text_input, const char* text) {
     furi_check(text_input);
     with_view_model(text_input->view, TextInputModel * model, { model->header = text; }, true);
 }
+
 #endif

+ 2 - 0
nfc_maker/dropin/text_input.h

@@ -6,6 +6,7 @@
 #pragma once
 
 #ifndef FW_ORIGIN_Momentum
+
 #include <gui/view.h>
 #include <gui/modules/validators.h>
 
@@ -99,4 +100,5 @@ void text_input_set_header_text(TextInput* text_input, const char* text);
 #ifdef __cplusplus
 }
 #endif
+
 #endif

+ 2 - 2
nfc_maker/nfc_maker.h

@@ -6,7 +6,7 @@
 #include <gui/modules/validators.h>
 #include <gui/view_dispatcher.h>
 #include <gui/scene_manager.h>
-#if __has_include(<assets_icons.h>)
+#ifdef FW_ORIGIN_Momentum
 #include <assets_icons.h>
 #else
 extern const Icon I_DolphinDone_80x58;
@@ -23,7 +23,7 @@ extern const Icon I_WarningDolphinFlip_45x42;
 #include "scenes/nfc_maker_scene.h"
 #include <lib/flipper_format/flipper_format.h>
 #include <toolbox/name_generator.h>
-#if __has_include(<applications/main/nfc/nfc_app_i.h>)
+#if defined(FW_ORIGIN_Momentum) && __has_include(<applications/main/nfc/nfc_app_i.h>)
 #include <applications/main/nfc/nfc_app_i.h>
 #else
 #define NFC_APP_FOLDER    EXT_PATH("nfc")