From b0ac267fd56850ab727ebe6754f18fd9c1df486b Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sat, 10 Sep 2022 20:59:53 +0000 Subject: [PATCH] [d3d9] Explicitly cast to D3DRENDERSTATETYPE in ColorWriteIndex Need this to silence warnings after doing some arithmetic on an enum. --- src/d3d9/d3d9_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_util.h b/src/d3d9/d3d9_util.h index ab564f907..4358233f8 100644 --- a/src/d3d9/d3d9_util.h +++ b/src/d3d9/d3d9_util.h @@ -241,7 +241,7 @@ namespace dxvk { } inline D3DRENDERSTATETYPE ColorWriteIndex(uint32_t i) { - return D3DRENDERSTATETYPE(i ? D3DRS_COLORWRITEENABLE1 + i - 1 : D3DRS_COLORWRITEENABLE); + return D3DRENDERSTATETYPE(i ? D3DRENDERSTATETYPE(D3DRS_COLORWRITEENABLE1 + i - 1) : D3DRS_COLORWRITEENABLE); } inline bool AreFormatsSimilar(D3D9Format srcFormat, D3D9Format dstFormat) {