File tree Expand file tree Collapse file tree 3 files changed +30
-24
lines changed Expand file tree Collapse file tree 3 files changed +30
-24
lines changed Original file line number Diff line number Diff line change @@ -1044,7 +1044,7 @@ elseif(WIN32)
1044
1044
src/detection/terminalfont/terminalfont_windows.c
1045
1045
src/detection/terminalshell/terminalshell_windows.c
1046
1046
src/detection/terminalsize/terminalsize_windows.c
1047
- src/detection/theme/theme_nosupport .c
1047
+ src/detection/theme/theme_windows .c
1048
1048
src/detection/tpm/tpm_windows.c
1049
1049
src/detection/uptime/uptime_windows.c
1050
1050
src/detection/users/users_windows.c
Original file line number Diff line number Diff line change @@ -254,27 +254,4 @@ void ffConnectDisplayServerImpl(FFDisplayServerResult* ds)
254
254
}
255
255
256
256
detectDisplays (ds );
257
-
258
- //https://github.com/hykilpikonna/hyfetch/blob/master/neofetch#L2067
259
- const FFOSResult * os = ffDetectOS ();
260
- uint32_t ver = (uint32_t ) ffStrbufToUInt (& os -> version , 0 );
261
- if (ver > 1000 )
262
- {
263
- // Windows Server
264
- if (ver >= 2016 )
265
- ffStrbufSetStatic (& ds -> dePrettyName , "Fluent" );
266
- else if (ver >= 2012 )
267
- ffStrbufSetStatic (& ds -> dePrettyName , "Metro" );
268
- else
269
- ffStrbufSetStatic (& ds -> dePrettyName , "Aero" );
270
- }
271
- else
272
- {
273
- if (ver >= 10 )
274
- ffStrbufSetStatic (& ds -> dePrettyName , "Fluent" );
275
- else if (ver >= 8 )
276
- ffStrbufSetStatic (& ds -> dePrettyName , "Metro" );
277
- else
278
- ffStrbufSetStatic (& ds -> dePrettyName , "Aero" );
279
- }
280
257
}
Original file line number Diff line number Diff line change
1
+ #include "theme.h"
2
+
3
+ #include "detection/os/os.h"
4
+
5
+ const char * ffDetectTheme (FFThemeResult * result )
6
+ {
7
+ const FFOSResult * os = ffDetectOS ();
8
+ uint32_t ver = (uint32_t ) ffStrbufToUInt (& os -> version , 0 );
9
+ if (ver > 1000 )
10
+ {
11
+ // Windows Server
12
+ if (ver >= 2016 )
13
+ ffStrbufSetStatic (& result -> theme1 , "Fluent" );
14
+ else if (ver >= 2012 )
15
+ ffStrbufSetStatic (& result -> theme1 , "Metro" );
16
+ else
17
+ ffStrbufSetStatic (& result -> theme1 , "Aero" );
18
+ }
19
+ else
20
+ {
21
+ if (ver >= 10 )
22
+ ffStrbufSetStatic (& result -> theme1 , "Fluent" );
23
+ else if (ver >= 8 )
24
+ ffStrbufSetStatic (& result -> theme1 , "Metro" );
25
+ else
26
+ ffStrbufSetStatic (& result -> theme1 , "Aero" );
27
+ }
28
+ return NULL ;
29
+ }
You can’t perform that action at this time.
0 commit comments