1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-13 19:29:14 +01:00

[dxvk] Fix opening state cache files for writing

operator bool() only checks if errors have occured in previous writes,
so we'd be missing out on the first cache entry written.
This commit is contained in:
Philip Rebohle 2022-07-03 15:37:52 +02:00
parent 7c4d602863
commit 8d413e2d09
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -958,8 +958,8 @@ namespace dxvk {
m_writerQueue.pop();
}
if (!file) {
file = std::ofstream(getCacheFileName().c_str(),
if (!file.is_open()) {
file.open(getCacheFileName().c_str(),
std::ios_base::binary |
std::ios_base::app);
}