1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 13:08:50 +01:00

[dxgi] Fix potential division by zero in log statement

Apparently 0/0 is legal and should be interpreted as 0/1.
This commit is contained in:
Jens Peters 2023-01-27 23:06:07 +01:00 committed by Philip Rebohle
parent c6111eaf61
commit 41b1efd7ce

View File

@ -713,7 +713,7 @@ namespace dxvk {
"DXGI: Failed to query closest mode:", "DXGI: Failed to query closest mode:",
"\n Format: ", preferredMode.Format, "\n Format: ", preferredMode.Format,
"\n Mode: ", preferredMode.Width, "x", preferredMode.Height, "\n Mode: ", preferredMode.Width, "x", preferredMode.Height,
"@", preferredMode.RefreshRate.Numerator / preferredMode.RefreshRate.Denominator)); "@", preferredMode.RefreshRate.Numerator / std::max(preferredMode.RefreshRate.Denominator, 1u)));
return hr; return hr;
} }