TermiinalShell: code refactor
This commit is contained in:
1 parent
b1f63ab822
commit
a0acfeed56
1 file changed
+7
-4
@@ -156,15 +156,18 @@ bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version)
|
||||
return ok;
|
||||
}
|
||||
|
||||
FF_MAYBE_UNUSED static bool getTerminalVersionTermux(FFstrbuf* version)
|
||||
{
|
||||
ffStrbufSetS(version, getenv("TERMUX_VERSION"));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version)
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
|
||||
if(ffStrbufEqualS(processName, "Termux"))
|
||||
{
|
||||
ffStrbufSetS(version, getenv("TERMUX_VERSION"));
|
||||
return true;
|
||||
}
|
||||
return getTerminalVersionTermux(version);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user