mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
FixRed a824085 skin: add %pX tag checkwps, ATA builds
ata_disk_isssd() return 0 for SIMULATOR Change-Id: If281b5ce7a98f338dfd81635c8936dd90c41b9bb
This commit is contained in:
parent
a824085057
commit
3e08b86e4b
3 changed files with 11 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue