From 9b7bb9290e9b8f4f958590a674911b0ae0ae710e Mon Sep 17 00:00:00 2001 From: Vincent Billet Date: Mon, 26 May 2025 08:52:46 +0200 Subject: [PATCH] HRESULT_FROM_WIN32 correction --- core/sys/windows/winerror.odin | 2 +- core/sys/windows/winmm.odin | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/sys/windows/winerror.odin b/core/sys/windows/winerror.odin index 764565d66..05ab3d028 100644 --- a/core/sys/windows/winerror.odin +++ b/core/sys/windows/winerror.odin @@ -275,7 +275,7 @@ MAKE_HRESULT :: #force_inline proc "contextless" (#any_int sev: int, #any_int fa } HRESULT_FROM_WIN32 :: #force_inline proc "contextless" (#any_int code: int) -> HRESULT { - return HRESULT(code) <= 0 ? HRESULT(code) : HRESULT((code & 0x0000FFFF) | (int(FACILITY.WIN32) << 16) | 0x80000000) + return HRESULT(code) <= 0 ? HRESULT(code) : HRESULT(uint(code & 0x0000FFFF) | (uint(FACILITY.WIN32) << 16) | 0x80000000) } DECODE_HRESULT :: #force_inline proc "contextless" (#any_int hr: int) -> (SEVERITY, FACILITY, int) { diff --git a/core/sys/windows/winmm.odin b/core/sys/windows/winmm.odin index 1d3ee5daa..bf79e803f 100644 --- a/core/sys/windows/winmm.odin +++ b/core/sys/windows/winmm.odin @@ -610,7 +610,7 @@ WAVEFORMATEXTENSIBLE :: struct { wSamplesPerBlock: WORD, /* valid if wBitsPerSample==0 */ wReserved: WORD, /* If neither applies, set to zero. */ }, - dwChannelMask: SPEAKER_FLAGS, /* which channels are present in stream */ + dwChannelMask: SPEAKER_FLAGS, /* which channels are present in stream */ SubFormat: GUID, }