Skip to content

Commit 1eef6f8

Browse files
committed
CPU: remove useless w/ Radeon 780M Graphics
1 parent 85ed4b1 commit 1eef6f8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/detection/cpu/cpu.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ const char* ffDetectCPU(const FFCPUOptions* options, FFCPUResult* cpu)
1010
const char* removeStrings[] = {
1111
" CPU", " FPU", " APU", " Processor",
1212
" Dual-Core", " Quad-Core", " Six-Core", " Eight-Core", " Ten-Core",
13-
" 2-Core", " 4-Core", " 6-Core", " 8-Core", " 10-Core", " 12-Core", " 14-Core", " 16-Core",
14-
" with Radeon Graphics"
13+
" 2-Core", " 4-Core", " 6-Core", " 8-Core", " 10-Core", " 12-Core", " 14-Core", " 16-Core"
1514
};
1615
ffStrbufRemoveStrings(&cpu->name, ARRAY_SIZE(removeStrings), removeStrings);
16+
uint32_t radeonGraphics = ffStrbufFirstIndexS(&cpu->name, " w/ Radeon "); // w/ Radeon 780M Graphics
17+
if (radeonGraphics >= cpu->name.length)
18+
radeonGraphics = ffStrbufFirstIndexS(&cpu->name, " with Radeon ");
19+
if (radeonGraphics < cpu->name.length)
20+
ffStrbufSubstrBefore(&cpu->name, radeonGraphics);
1721
ffStrbufSubstrBeforeFirstC(&cpu->name, '@'); //Cut the speed output in the name as we append our own
1822
ffStrbufTrimRight(&cpu->name, ' '); //If we removed the @ in previous step there was most likely a space before it
1923
ffStrbufRemoveDupWhitespaces(&cpu->name);

0 commit comments

Comments
 (0)