diff options
| author | jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> | 2025-10-16 15:59:22 +0200 |
|---|---|---|
| committer | jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> | 2025-10-16 15:59:22 +0200 |
| commit | 7d9f915ff985786e6068ef62f98be2d00540262a (patch) | |
| tree | a536db98aa8a4b24687a103b20078fed4713d320 /core/sys/windows/user32.odin | |
| parent | 4b8751bebdbf40528c2af8ff5a4ef38c1ab429cc (diff) | |
barriers, rawinput macros
Diffstat (limited to 'core/sys/windows/user32.odin')
| -rw-r--r-- | core/sys/windows/user32.odin | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin index 49ebb49cb..51cbde4ae 100644 --- a/core/sys/windows/user32.odin +++ b/core/sys/windows/user32.odin @@ -398,6 +398,14 @@ MAKEINTRESOURCEW :: #force_inline proc "contextless" (#any_int i: int) -> LPWSTR return cast(LPWSTR)uintptr(WORD(i)) } +RAWINPUT_ALIGN :: proc(x: uintptr) -> uintptr { + return (x + size_of(uintptr) - 1) & ~uintptr(size_of(uintptr) - 1) +} + +NEXTRAWINPUTBLOCK :: proc(ptr: ^RAWINPUT) -> ^RAWINPUT { + return cast(^RAWINPUT)RAWINPUT_ALIGN(uintptr(ptr) + uintptr(ptr.header.dwSize)) +} + Monitor_From_Flags :: enum DWORD { MONITOR_DEFAULTTONULL = 0x00000000, // Returns NULL MONITOR_DEFAULTTOPRIMARY = 0x00000001, // Returns a handle to the primary display monitor |