flyx / OpenGLAda

Thick Ada binding for OpenGL and GLFW
flyx.github.io/OpenGLAda/
MIT License
96 stars 13 forks source link

Added Set_Iconification, missing Numpad_Lock key #153

Closed Cre8or closed 2 years ago

Cre8or commented 2 years ago

When merged this pull request will:

Requires Glfw 3.3 or higher.

For context, I came across this while binding to ImGui and only discovered the issue through sheer luck (well, through overexcited button mashing resulting in a constraint error). It might be a good idea to take a close look at what keys Glfw defines to see if anything else is missing, though from further button mashing experiments I have been unable to reproduce the issue after my commits. 😛

flyx commented 2 years ago

This looks simple enough to merge it directly. Thanks!

Considering the keys, I assume this happened due to GLFW adding support for more keys after I wrote this binding. Sadly, what is „safe“ in C world (adding some new enum value) because you'll just get a value that doesn't match anything you'd expect, is an API break in Ada because it actually checks whether the value is known.

I won't evaluate whether additional keys are missing since am currently considering archiving this project. I can't support it anymore with reasonable effort from an aarch64-darwin system.