MX 1 год назад
Родитель
Сommit
0f1092126a

+ 1 - 1
base_pack/doom/application.fam

@@ -13,6 +13,6 @@ App(
     fap_category="Games",
     fap_icon_assets="assets",
     fap_author="@xMasterX & @Svarich & @hedger (original code by @p4nic4ttack)",
-    fap_version="1.2",
+    fap_version="1.3",
     fap_description="Will it run Doom?",
 )

+ 1 - 1
base_pack/doom/assets.h

@@ -9,7 +9,7 @@
 #define bmp_font_width_pxs 192
 #define bmp_font_height_pxs 48
 #define CHAR_MAP " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.,-_(){}[]#"
-#define CHAR_WIDTH 4
+#define UICHAR_WIDTH 4
 #define CHAR_HEIGHT 6
 
 #define BMP_GUN_WIDTH 32

+ 1 - 1
base_pack/doom/display.h

@@ -117,7 +117,7 @@ void drawTextSpace(int8_t x, int8_t y, char* txt, uint8_t space, Canvas* const c
     while((ch = txt[i]) != '\0') {
         drawChar(pos, y, ch, canvas);
         i++;
-        pos += CHAR_WIDTH + space;
+        pos += UICHAR_WIDTH + space;
 
         // shortcut on end of screen
         if(pos > SCREEN_WIDTH) return;

+ 2 - 2
base_pack/unitemp/Sensors.c

@@ -493,14 +493,14 @@ Sensor* unitemp_sensor_alloc(char* name, const SensorType* type, char* args) {
     Sensor* sensor = malloc(sizeof(Sensor));
     if(sensor == NULL) {
         FURI_LOG_E(APP_NAME, "Sensor %s allocation error", name);
-        return false;
+        return NULL;
     }
 
     //Выделение памяти под имя
     sensor->name = malloc(11);
     if(sensor->name == NULL) {
         FURI_LOG_E(APP_NAME, "Sensor %s name allocation error", name);
-        return false;
+        return NULL;
     }
     //Запись имени датчка
     strcpy(sensor->name, name);

+ 1 - 1
non_catalog_apps/FlipBIP/lib/crypto/base32.c

@@ -51,7 +51,7 @@ char* base32_encode(
         int ret = base32_encode_character(out[i], alphabet);
 
         if(ret == -1) {
-            return false;
+            return NULL;
         } else {
             out[i] = ret;
         }

+ 1 - 1
non_catalog_apps/air_mouse_ofw/air_mouse_app.c

@@ -15,7 +15,7 @@
 
 #define TAG "SensorModule"
 
-#define BLE_HID_KEYS_PATH "/ext/apps_data/hid_ble/.bt_hid.keys"
+#define HID_BT_KEYS_STORAGE_NAME ".bt_hid.keys"
 
 typedef struct {
     Gui* gui;

+ 1 - 1
non_catalog_apps/crypto_dictionary_book/constants/constants.h

@@ -3,6 +3,6 @@
 
 #define WIDGET_WIDTH 126
 #define WIDGET_HEIGHT 64
-#define CHAR_WIDTH 1
+#define UICHAR_WIDTH 1
 
 #endif // CONSTANTS_H

+ 21 - 21
non_catalog_apps/crypto_dictionary_book/scenes/scenes.c

@@ -70,21 +70,21 @@ char* wrap_text(const char* text, size_t max_line_width) {
     // More realistic initial size estimation
     size_t allocated_size = len + len / max_line_width + 1;
     char* wrapped = malloc(allocated_size);
-    if (!wrapped) return NULL;
+    if(!wrapped) return NULL;
 
     size_t cur_line_len = 0;
     size_t wrapped_index = 0;
     size_t word_len = 0;
 
-    for (size_t i = 0; i < len; ++i) {
+    for(size_t i = 0; i < len; ++i) {
         word_len++;
-        if (text[i] == '\n') {
-            for (size_t j = i - word_len + 1; j <= i; ++j) {
+        if(text[i] == '\n') {
+            for(size_t j = i - word_len + 1; j <= i; ++j) {
                 // Check and reallocate if necessary before writing to the buffer
-                if (wrapped_index >= allocated_size) {
+                if(wrapped_index >= allocated_size) {
                     allocated_size *= 2;
                     char* new_wrapped = realloc(wrapped, allocated_size);
-                    if (!new_wrapped) {
+                    if(!new_wrapped) {
                         free(wrapped);
                         return NULL;
                     }
@@ -97,41 +97,41 @@ char* wrap_text(const char* text, size_t max_line_width) {
             continue;
         }
 
-        if (text[i] == ' ' || i == len - 1) {
-            if (word_len >= max_line_width) {
-                if (cur_line_len > 0) {
+        if(text[i] == ' ' || i == len - 1) {
+            if(word_len >= max_line_width) {
+                if(cur_line_len > 0) {
                     wrapped[wrapped_index++] = '\n';
                     cur_line_len = 0;
                 }
-                for (size_t j = i - word_len + 1; j <= i; ++j) {
+                for(size_t j = i - word_len + 1; j <= i; ++j) {
                     // Check and reallocate if necessary before writing to the buffer
-                    if (wrapped_index >= allocated_size) {
+                    if(wrapped_index >= allocated_size) {
                         allocated_size *= 2;
                         char* new_wrapped = realloc(wrapped, allocated_size);
-                        if (!new_wrapped) {
+                        if(!new_wrapped) {
                             free(wrapped);
                             return NULL;
                         }
                         wrapped = new_wrapped;
                     }
                     wrapped[wrapped_index++] = text[j];
-                    if (++cur_line_len >= max_line_width && text[j] != '\n') {
+                    if(++cur_line_len >= max_line_width && text[j] != '\n') {
                         wrapped[wrapped_index++] = '\n';
                         cur_line_len = 0;
                     }
                 }
-            } else if (cur_line_len + word_len > max_line_width) {
-                if (cur_line_len > 0) {
+            } else if(cur_line_len + word_len > max_line_width) {
+                if(cur_line_len > 0) {
                     wrapped[wrapped_index++] = '\n';
                     cur_line_len = 0;
                 }
             }
-            for (size_t j = i - word_len + 1; j <= i; ++j) {
+            for(size_t j = i - word_len + 1; j <= i; ++j) {
                 // Check and reallocate if necessary before writing to the buffer
-                if (wrapped_index >= allocated_size) {
+                if(wrapped_index >= allocated_size) {
                     allocated_size *= 2;
                     char* new_wrapped = realloc(wrapped, allocated_size);
-                    if (!new_wrapped) {
+                    if(!new_wrapped) {
                         free(wrapped);
                         return NULL;
                     }
@@ -148,7 +148,6 @@ char* wrap_text(const char* text, size_t max_line_width) {
     return wrapped;
 }
 
-
 void topic_scene_on_enter(void* context) {
     furi_assert(context);
     App* app = (App*)context;
@@ -162,13 +161,14 @@ void topic_scene_on_enter(void* context) {
     if(file_stream_open(app->file_stream, file_path, FSAM_READ, FSOM_OPEN_EXISTING)) {
         FuriString* line = furi_string_alloc();
         while(stream_read_line(app->file_stream, line)) {
-            dynamic_buffer_append(&dynamic_content, furi_string_get_cstr(line), furi_string_size(line));
+            dynamic_buffer_append(
+                &dynamic_content, furi_string_get_cstr(line), furi_string_size(line));
             dynamic_buffer_append(&dynamic_content, "\r\n", 1);
         }
         dynamic_buffer_append(&dynamic_content, "\0", 1);
         furi_string_free(line);
         file_stream_close(app->file_stream);
-        size_t max_line_width = WIDGET_WIDTH / CHAR_WIDTH;
+        size_t max_line_width = WIDGET_WIDTH / UICHAR_WIDTH;
         char* wrapped_text = wrap_text(dynamic_content.data, max_line_width);
         dynamic_buffer_free(&dynamic_content);
 

+ 2 - 1
non_catalog_apps/hid_file_transfer/main.c

@@ -390,7 +390,8 @@ static void dispatch_view(void* contextd, uint32_t index) {
     }
 }
 
-bool eventCallback() {
+static bool eventCallback(void* context) {
+    UNUSED(context);
     return false;
 }
 

+ 1 - 1
non_catalog_apps/the_c_programming_language_book/constants/constants.h

@@ -3,6 +3,6 @@
 
 #define WIDGET_WIDTH 128
 #define WIDGET_HEIGHT 64
-#define CHAR_WIDTH 5
+#define UICHAR_WIDTH 5
 
 #endif // CONSTANTS_H

+ 3 - 2
non_catalog_apps/the_c_programming_language_book/scenes/scenes.c

@@ -157,13 +157,14 @@ void topic_scene_on_enter(void* context) {
     if(file_stream_open(app->file_stream, file_path, FSAM_READ, FSOM_OPEN_EXISTING)) {
         FuriString* line = furi_string_alloc();
         while(stream_read_line(app->file_stream, line)) {
-            dynamic_buffer_append(&dynamic_content, furi_string_get_cstr(line), furi_string_size(line));
+            dynamic_buffer_append(
+                &dynamic_content, furi_string_get_cstr(line), furi_string_size(line));
             dynamic_buffer_append(&dynamic_content, "\r\n", 1);
         }
         dynamic_buffer_append(&dynamic_content, "\0", 1);
         furi_string_free(line);
         file_stream_close(app->file_stream);
-        size_t max_line_width = WIDGET_WIDTH / CHAR_WIDTH;
+        size_t max_line_width = WIDGET_WIDTH / UICHAR_WIDTH;
         char* wrapped_text = wrap_text(dynamic_content.data, max_line_width);
         dynamic_buffer_free(&dynamic_content);