mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
set config file streams to full buffering. dramatically reduces startup/
shutdown latency on some devices with slow I/O access.
This commit is contained in:
parent
ac915abb5d
commit
fd43a460f4
@ -399,6 +399,7 @@ static config_file_t *config_file_new_internal(
|
|||||||
free(conf->path);
|
free(conf->path);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
setvbuf(file, NULL, _IOFBF, 0x4000);
|
||||||
|
|
||||||
while (!feof(file))
|
while (!feof(file))
|
||||||
{
|
{
|
||||||
@ -890,6 +891,7 @@ bool config_file_write(config_file_t *conf, const char *path)
|
|||||||
file = fopen(path, "w");
|
file = fopen(path, "w");
|
||||||
if (!file)
|
if (!file)
|
||||||
return false;
|
return false;
|
||||||
|
setvbuf(file, NULL, _IOFBF, 0x4000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
file = stdout;
|
file = stdout;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user