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

Cleanup initial Win32 window code #33

Closed
BrentFarris opened this issue Nov 27, 2023 · 1 comment
Closed

Cleanup initial Win32 window code #33

BrentFarris opened this issue Nov 27, 2023 · 1 comment
Assignees
Labels
task New feature or request

Comments

@BrentFarris
Copy link
Contributor

BrentFarris commented Nov 27, 2023

  • Move message handling to window_proc
  • Select shared memory by hwnd
    • Can use SetWindowLongPtrA and SetWindowLongPtrA
      • SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)myPtr);
      • LONG_PTR usrData = GetWindowLongPtrA(hwnd, GWLP_USERDATA);
      • Note that the first couple results from GetWindowLongPtrA will be NULL
  • Create a struct to hold shared memory and size
  • Write fatal error message string to shared memory
  • Error on fatal error from window construction
@BrentFarris BrentFarris added the task New feature or request label Nov 27, 2023
@BrentFarris BrentFarris self-assigned this Nov 27, 2023
BrentFarris added a commit that referenced this issue Nov 28, 2023
Adding a fatal message to be read from the caller of the window creation. If a fatal is returned from window create, then it will panic with the message. I've also better wrapped the shared memory into the InputEvent structure so that it can be written to without the need of memcpy. I also updated X11 to use the helper methods created for the shared memory.
BrentFarris added a commit that referenced this issue Nov 28, 2023
#33 Cleanup initial Win32 window code
@BrentFarris
Copy link
Contributor Author

Pull request video: https://youtu.be/RORrQXRaEA0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant