mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 05:04:17 +01:00
Rework stdout buffering on Windows.
Windows doesn't support line-buffering. We enable full-buffering instead and flush buffers per module.
This commit is contained in:
+4
-5
@@ -916,11 +916,6 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
}
|
||||
else if(strcasecmp(key, "--allow-slow-operations") == 0)
|
||||
instance->config.allowSlowOperations = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--unbuffered") == 0)
|
||||
{
|
||||
if(optionParseBoolean(value))
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
}
|
||||
else if(strcasecmp(key, "--escape-bedrock") == 0)
|
||||
instance->config.escapeBedrock = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--pipe") == 0)
|
||||
@@ -1435,6 +1430,10 @@ int main(int argc, const char** argv)
|
||||
printf("\033[s\033[1A\033[9999999C\033[%dD%s\033[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && defined(FF_ENABLE_BUFFER)
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
startIndex = colonIndex + 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user