mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.92][ARM] Add MediaTek ASCII art
This commit is contained in:
@@ -173,6 +173,13 @@ struct ascii* set_ascii(VENDOR vendor, STYLE style, struct colors* cs) {
|
||||
COL_FANCY_4 = COLOR_FG_WHITE;
|
||||
art->ascii_chars[0] = '@';
|
||||
}
|
||||
else if(art->vendor == SOC_MEDIATEK) {
|
||||
COL_FANCY_1 = COLOR_BG_BLUE;
|
||||
COL_FANCY_2 = COLOR_BG_YELLOW;
|
||||
COL_FANCY_3 = COLOR_FG_WHITE;
|
||||
COL_FANCY_4 = COLOR_FG_BLUE;
|
||||
art->ascii_chars[0] = '@';
|
||||
}
|
||||
else {
|
||||
COL_FANCY_1 = COLOR_BG_CYAN;
|
||||
COL_FANCY_2 = COLOR_BG_CYAN;
|
||||
@@ -274,6 +281,8 @@ struct ascii* set_ascii(VENDOR vendor, STYLE style, struct colors* cs) {
|
||||
#elif ARCH_ARM
|
||||
if(art->vendor == SOC_SNAPDRAGON)
|
||||
strcpy(tmp, SNAPDRAGON_ASCII);
|
||||
else if(art->vendor == SOC_MEDIATEK)
|
||||
strcpy(tmp, MEDIATEK_ASCII);
|
||||
else
|
||||
strcpy(tmp, ARM_ASCII);
|
||||
#endif
|
||||
@@ -452,7 +461,7 @@ bool print_cpufetch_x86(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_ARM
|
||||
void print_algorithm_snapdragon(struct ascii* art, int i, int n) {
|
||||
void print_algorithm_snapd_mtk(struct ascii* art, int i, int n) {
|
||||
if(art->art[n][i] == '@')
|
||||
printf("%s%c%s", art->color1_ascii, art->ascii_chars[0], art->reset);
|
||||
else if(art->art[n][i] == '#')
|
||||
@@ -514,8 +523,8 @@ void print_ascii_arm(struct ascii* art, uint32_t la, void (*callback_print_algor
|
||||
void print_ascii(struct ascii* art) {
|
||||
uint32_t longest_attribute = longest_attribute_length(art);
|
||||
|
||||
if(art->vendor == SOC_SNAPDRAGON)
|
||||
print_ascii_arm(art, longest_attribute, &print_algorithm_snapdragon);
|
||||
if(art->vendor == SOC_SNAPDRAGON || art->vendor == SOC_MEDIATEK)
|
||||
print_ascii_arm(art, longest_attribute, &print_algorithm_snapd_mtk);
|
||||
else {
|
||||
if(art->vendor != SOC_UNKNOWN)
|
||||
printWarn("Invalid SOC vendor: %d\n", art->vendor);
|
||||
|
||||
Reference in New Issue
Block a user