@@ -44,7 +44,7 @@ static void getKDE(FFstrbuf* result, FFDEOptions* options)
4444 if (result -> length == 0 )
4545 ffParsePropFileData ("wayland-sessions/plasmawayland5.desktop" , "X-KDE-PluginInfo-Version =" , result );
4646
47- if (result -> length == 0 && options -> slowVersionDetection )
47+ if (result -> length == 0 )
4848 {
4949 if (ffProcessAppendStdOut (result , (char * const []){
5050 "plasmashell" ,
@@ -73,7 +73,7 @@ static void getGnome(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options)
7373{
7474 getGnomeByDbus (result );
7575
76- if (result -> length == 0 && options -> slowVersionDetection )
76+ if (result -> length == 0 )
7777 {
7878 if (ffProcessAppendStdOut (result , (char * const []){
7979 "gnome-shell" ,
@@ -91,7 +91,7 @@ static void getCinnamon(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options)
9191 if (result -> length == 0 )
9292 ffParsePropFileData ("applications/cinnamon.desktop" , "X-GNOME-Bugzilla-Version =" , result );
9393
94- if (result -> length == 0 && options -> slowVersionDetection )
94+ if (result -> length == 0 )
9595 {
9696 if (ffProcessAppendStdOut (result , (char * const []){
9797 "cinnamon" ,
@@ -102,7 +102,7 @@ static void getCinnamon(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options)
102102 }
103103}
104104
105- static void getMate (FFstrbuf * result , FFDEOptions * options )
105+ static void getMate (FFstrbuf * result , FF_MAYBE_UNUSED FFDEOptions * options )
106106{
107107 FF_STRBUF_AUTO_DESTROY major = ffStrbufCreate ();
108108 FF_STRBUF_AUTO_DESTROY minor = ffStrbufCreate ();
@@ -116,7 +116,7 @@ static void getMate(FFstrbuf* result, FFDEOptions* options)
116116
117117 ffParseSemver (result , & major , & minor , & micro );
118118
119- if (result -> length == 0 && options -> slowVersionDetection )
119+ if (result -> length == 0 )
120120 {
121121 ffProcessAppendStdOut (result , (char * const []){
122122 "mate-session" ,
@@ -143,11 +143,11 @@ static const char* getXfce4ByLib(FFstrbuf* result)
143143#endif
144144}
145145
146- static void getXFCE4 (FFstrbuf * result , FFDEOptions * options )
146+ static void getXFCE4 (FFstrbuf * result , FF_MAYBE_UNUSED FFDEOptions * options )
147147{
148148 getXfce4ByLib (result );
149149
150- if (result -> length == 0 && options -> slowVersionDetection )
150+ if (result -> length == 0 )
151151 {
152152 //This is somewhat slow
153153 ffProcessAppendStdOut (result , (char * const []){
@@ -171,7 +171,7 @@ static void getLXQt(FFstrbuf* result, FFDEOptions* options)
171171 if (result -> length == 0 )
172172 ffParsePropFileData ("cmake/lxqt/lxqt-config-version.cmake" , "set ( PACKAGE_VERSION" , result );
173173
174- if (result -> length == 0 && options -> slowVersionDetection )
174+ if (result -> length == 0 )
175175 {
176176 //This is really, really, really slow. Thank you, LXQt developers
177177 ffProcessAppendStdOut (result , (char * const []){
@@ -218,18 +218,15 @@ static const char* getTrinity(FFstrbuf* result, FFDEOptions* options)
218218 if (ffBinaryExtractStrings (path .chars , extractTdeVersion , result , strlen ("R0.0.0" )) == NULL )
219219 return NULL ;
220220
221- if (options -> slowVersionDetection )
222- {
223- ffStrbufClear (& path );
224- ffProcessAppendStdOut (& path , (char * const []){
225- "tde-config" ,
226- "--version" ,
227- NULL
228- });
221+ ffStrbufClear (& path );
222+ ffProcessAppendStdOut (& path , (char * const []){
223+ "tde-config" ,
224+ "--version" ,
225+ NULL
226+ });
229227
230- ffParsePropLines (path .chars , "TDE: " , result );
231- return NULL ;
232- }
228+ ffParsePropLines (path .chars , "TDE: " , result );
229+ return NULL ;
233230
234231 return "All methods failed" ;
235232}
0 commit comments