Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RawInput: Buffer pointer should be aligned on a DWORD (32-bit) boundary #1953

Open
wants to merge 13 commits into
base: docs
Choose a base branch
from

Conversation

DJm00n
Copy link
Contributor

@DJm00n DJm00n commented Jan 7, 2025

Buffer pointer should be aligned on a DWORD (32-bit) boundary.

Copy link

@DJm00n : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@DJm00n DJm00n changed the title Update nf-winuser-getrawinputbuffer.md RawInput: Buffer should be aligned on a DWORD (32-bit) boundary Jan 7, 2025
@DJm00n DJm00n changed the title RawInput: Buffer should be aligned on a DWORD (32-bit) boundary RawInput: Pointer should be aligned on a DWORD (32-bit) boundary Jan 7, 2025
@DJm00n DJm00n changed the title RawInput: Pointer should be aligned on a DWORD (32-bit) boundary RawInput: Buffer pointer should be aligned on a DWORD (32-bit) boundary Jan 14, 2025
Copy link
Contributor

@riverar riverar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft is saying that the starting address of each RAWINPUT structure within the buffer must be aligned to a pointer boundary. The pointer itself doesn’t need special alignment.

Memory allocated with malloc or new will already handle this, so it's not clear why this warning is here. My guess is someone got burned after using a custom allocator (e.g., on say, the Xbox) and added a note for future developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants