Willy-JL 1 год назад
Родитель
Сommit
d82426ddf3
2 измененных файлов с 7 добавлено и 8 удалено
  1. 2 3
      doom/display.h
  2. 5 5
      quac/scenes/scene_action_settings.c

+ 2 - 3
doom/display.h

@@ -243,7 +243,7 @@ bool getGradientPixel(uint8_t x, uint8_t y, uint8_t i) {
         + y * GRADIENT_WIDTH % (GRADIENT_WIDTH * GRADIENT_HEIGHT) // y byte offset
         + y * GRADIENT_WIDTH % (GRADIENT_WIDTH * GRADIENT_HEIGHT) // y byte offset
         + x / GRADIENT_HEIGHT % GRADIENT_WIDTH; // x byte offset
         + x / GRADIENT_HEIGHT % GRADIENT_WIDTH; // x byte offset
     //uint8_t *gradient_data = NULL;
     //uint8_t *gradient_data = NULL;
-    //furi_hal_compress_icon_decode(icon_get_data(&I_gradient_inv), &gradient_data);
+    //furi_hal_compress_icon_decode(icon_get_frame_data(&I_gradient_inv, 0), &gradient_data);
     // return the bit based on x
     // return the bit based on x
     return read_bit(pgm_read_byte(gradient + index), x % 8);
     return read_bit(pgm_read_byte(gradient + index), x % 8);
 }
 }
@@ -259,8 +259,7 @@ void fadeScreen(uint8_t intensity, bool color, Canvas* const canvas) {
 // Adds a delay to limit play to specified fps
 // Adds a delay to limit play to specified fps
 // Calculates also delta to keep movement consistent in lower framerates
 // Calculates also delta to keep movement consistent in lower framerates
 void fps() {
 void fps() {
-    while(furi_get_tick() - lastFrameTime < FRAME_TIME)
-        ;
+    while(furi_get_tick() - lastFrameTime < FRAME_TIME);
     delta = (double)(furi_get_tick() - lastFrameTime) / (double)FRAME_TIME;
     delta = (double)(furi_get_tick() - lastFrameTime) / (double)FRAME_TIME;
     lastFrameTime = furi_get_tick();
     lastFrameTime = furi_get_tick();
 }
 }

+ 5 - 5
quac/scenes/scene_action_settings.c

@@ -76,15 +76,15 @@ static bool scene_action_settings_import_file_browser_callback(
     char ext[MAX_EXT_LEN];
     char ext[MAX_EXT_LEN];
     path_extract_extension(path, ext, MAX_EXT_LEN);
     path_extract_extension(path, ext, MAX_EXT_LEN);
     if(!strcmp(ext, ".sub")) {
     if(!strcmp(ext, ".sub")) {
-        memcpy(*icon, icon_get_data(&I_SubGHz_10px), 32); // TODO: find the right size!
+        memcpy(*icon, icon_get_frame_data(&I_SubGHz_10px, 0), 32); // TODO: find the right size!
     } else if(!strcmp(ext, ".rfid")) {
     } else if(!strcmp(ext, ".rfid")) {
-        memcpy(*icon, icon_get_data(&I_RFID_10px), 32);
+        memcpy(*icon, icon_get_frame_data(&I_RFID_10px, 0), 32);
     } else if(!strcmp(ext, ".ir")) {
     } else if(!strcmp(ext, ".ir")) {
-        memcpy(*icon, icon_get_data(&I_IR_10px), 32);
+        memcpy(*icon, icon_get_frame_data(&I_IR_10px, 0), 32);
     } else if(!strcmp(ext, ".nfc")) {
     } else if(!strcmp(ext, ".nfc")) {
-        memcpy(*icon, icon_get_data(&I_NFC_10px), 32);
+        memcpy(*icon, icon_get_frame_data(&I_NFC_10px, 0), 32);
     } else if(!strcmp(ext, ".qpl")) {
     } else if(!strcmp(ext, ".qpl")) {
-        memcpy(*icon, icon_get_data(&I_Playlist_10px), 32);
+        memcpy(*icon, icon_get_frame_data(&I_Playlist_10px, 0), 32);
     } else {
     } else {
         return false;
         return false;
     }
     }