aboutsummaryrefslogtreecommitdiff
path: root/core/sys/windows/util.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-07-21 17:08:11 +0100
committergingerBill <bill@gingerbill.org>2022-07-21 17:08:11 +0100
commite1748a5dd172c751354196cc6cc146ae675349bc (patch)
treecd7b10aa8315b740a0108ccdf1597be098f35798 /core/sys/windows/util.odin
parentb6408d1b3fc02b738933a32027e0698a38f8a9a6 (diff)
Add `MAKE_WORD`
Diffstat (limited to 'core/sys/windows/util.odin')
-rw-r--r--core/sys/windows/util.odin4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/sys/windows/util.odin b/core/sys/windows/util.odin
index c350032f0..2bdd72ed2 100644
--- a/core/sys/windows/util.odin
+++ b/core/sys/windows/util.odin
@@ -22,6 +22,10 @@ GET_Y_LPARAM :: #force_inline proc "contextless" (lp: LPARAM) -> c_int {
return cast(c_int)cast(c_short)HIWORD(cast(DWORD)lp)
}
+MAKE_WORD :: #force_inline proc "contextless" (x, y: WORD) -> WORD {
+ return x << 8 | y
+}
+
utf8_to_utf16 :: proc(s: string, allocator := context.temp_allocator) -> []u16 {
if len(s) < 1 {
return nil