mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 02:34:23 -05:00
updater: Don't force file flushes when writing new files
Using FILE_FLAG_WRITE_THROUGH causes a flush to disk on each file which is bad for performance.
This commit is contained in:
committed by
Ryan Foster
parent
95bfb81f69
commit
1866f8c1e6
@@ -217,7 +217,7 @@ static string QuickReadFile(const wchar_t *path)
|
||||
|
||||
static bool QuickWriteFile(const wchar_t *file, const void *data, size_t size)
|
||||
try {
|
||||
WinHandle handle = CreateFile(file, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH, nullptr);
|
||||
WinHandle handle = CreateFile(file, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, 0, nullptr);
|
||||
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
throw LastError();
|
||||
|
||||
Reference in New Issue
Block a user