FixRed a824085 skin: add %pX tag checkwps, ATA builds

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Sat, 27 Jun 2026 13:29:10 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 3e08b86e4b7c9f45845d8f621f53be7245683c24
Author: William Wilgus <[email protected]>
Date:   Sat Jun 27 13:12:21 2026 -0400

    FixRed a824085 skin: add %pX tag checkwps, ATA builds
    
    ata_disk_isssd() return 0 for SIMULATOR
    
    Change-Id: If281b5ce7a98f338dfd81635c8936dd90c41b9bb

diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 54b36ae31e..af0c83a8b2 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1236,7 +1236,9 @@ static int parse_progressbar_tag(struct skin_element* element,
         token->type = SKIN_TOKEN_BATTERY_PERCENTBAR;
     else if (token->type == SKIN_TOKEN_PLAYLIST_ELAPSED_PERCENT)
     {
+#ifndef __PCTOOL__
         wps_playlist_percent_enable(); /* enable scanning track lengths */
+#endif
         token->type = SKIN_TOKEN_PLAYLIST_PROGRESSBAR;
     }
     else if (token->type == SKIN_TOKEN_TUNER_RSSI)
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 3da1a52139..43b727a321 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -73,6 +73,10 @@
 #include "option_select.h"
 #include "wps.h"
 
+#if (CONFIG_STORAGE & STORAGE_ATA)
+#include "ata.h" /* ata_disk_isssd() */
+#endif
+
 #define NOINLINE __attribute__ ((noinline))
 
 static const char* get_codectype(const struct mp3entry* id3)
@@ -291,7 +295,7 @@ void wps_playlist_percent_prepare(void)
             if (size > 0)
             {
                 if (afmt != last_afmt || last_bps == 0
-                    || amount <= 50 || (amount <= 250 && ata_disk_isssd()) // TODO tune this for harddisk devices
+                    || amount <= 50 || (amount <= 250 && ata_disk_isssd())) // TODO tune this for harddisk devices
                 {
                     if (get_metadata_ex(tmp, fd, info.filename,
                         METADATA_EXCLUDE_ID3_PATH | METADATA_EXCLUDE_NORMALIZE))
diff --git a/firmware/export/ata.h b/firmware/export/ata.h
index d049f4cef2..ff08eaf5d0 100644
--- a/firmware/export/ata.h
+++ b/firmware/export/ata.h
@@ -168,6 +168,9 @@ int ata_spinup_time(void); /* ticks */
 /* Returns 1 if drive is solid-state */
 static inline int ata_disk_isssd(void)
 {
+#ifdef SIMULATOR
+    return 0;
+#else
     unsigned short *identify_info = ata_get_identify();
     /*
        Offset 217 is "Nominal Rotation rate"
@@ -206,6 +209,7 @@ static inline int ata_disk_isssd(void)
              || ((identify_info[83] & (1<<2)) &&          /* CFA compliant */
                  ((identify_info[160] & (1<<15)) == 0))   /* CF power level 0 */
            );
+#endif
 }
 
 /* Returns 1 if the drive supports power management commands */
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs