[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 d1f57e13b7
commit 2f6306815e
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 2 additions and 2 deletions

View File

@ -962,8 +962,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);
}