Browse Source

sys/windows: fix build issues

hikari 3 years ago
parent
commit
d2bac0c35e
2 changed files with 2 additions and 2 deletions
  1. 1 1
      core/sys/windows/gdi32.odin
  2. 1 1
      core/sys/windows/types.odin

+ 1 - 1
core/sys/windows/gdi32.odin

@@ -69,6 +69,6 @@ foreign gdi32 {
 
 
 // Windows colors are packed as ABGR
 // Windows colors are packed as ABGR
 RGB :: #force_inline proc "contextless" (r, g, b: u8) -> COLORREF {
 RGB :: #force_inline proc "contextless" (r, g, b: u8) -> COLORREF {
-	res: [4]u8 = {0, rgb.b, rgb.g, rgb.r}
+	res: [4]u8 = {0, b, g, r}
 	return transmute(COLORREF)res
 	return transmute(COLORREF)res
 }
 }

+ 1 - 1
core/sys/windows/types.odin

@@ -55,7 +55,7 @@ UINT_PTR :: uintptr
 ULONG :: c_ulong
 ULONG :: c_ulong
 UCHAR :: BYTE
 UCHAR :: BYTE
 NTSTATUS :: c.long
 NTSTATUS :: c.long
-COLORREF :: DWORD
+COLORREF :: DWORD // Windows colors are packed as ABGR
 LPCOLORREF :: ^COLORREF
 LPCOLORREF :: ^COLORREF
 LPARAM :: LONG_PTR
 LPARAM :: LONG_PTR
 WPARAM :: UINT_PTR
 WPARAM :: UINT_PTR