-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Move OS' MIDI methods into InputEventMIDI #86713
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code this has one issue:
The version in OS
is virtual, this means that if this is overridden anywhere the two versions will no longer line up, this needs to be resolved
Currently no system overrides this, but I'd say the method here should call the OS one
c46e51e
to
dd15a08
Compare
I updated the PR to have InputEventMIDI's methods call the OS ones as above. The intention for the originals to be deprecated should still be clear. |
dd15a08
to
87f99ea
Compare
87f99ea
to
9a6da1f
Compare
In fact this should probably be handled by updating the regression project, see: A solution for this without updating that project would be to match the names of the old OS methods, this would make sure this check doesn't fail, without having to depend on a PR there, and wouldn't be too much of an issue to just have a longer name |
My solution was indeed unfortunately wrong, so the two options now are to either change the name or add to the regression project (and revert my suggestions) |
Should be easy if it really is just adding "open_inputs" to the exceptions. Although part of me wonders if it's a good opportunity to come up with a better name for these three methods. |
It would be simple yeah but that would have to be merged before this I would suggest temporarily renaming that method to confirm that the exclusion solves the ci failure |
9a6da1f
to
53bae43
Compare
53bae43
to
f645d56
Compare
Required for godotengine/godot#86713 to be merged.
f645d56
to
2b617d7
Compare
Partially addresses godotengine/godot-proposals#8761.
Related to #86716 and #86693.
This PR moves the OS' methods related to MIDI into the InputEventMIDI, as static methods.
The previous methods are still available, but are marked as deprecated.
This means the following:
OS.open_midi_inputs()
InputEventMIDI.open_inputs()
OS.get_connected_midi_inputs()
InputEventMIDI.get_connected_inputs()
OS.close_midi_inputs()
InputEventMIDI.close_inputs()
The original intention was to move the global constants as well, but that fell through for the time being, and will be done in a separate PR for further discussion.
On the other hand, the methods are comparatively safer to implement and do not break existing compatibility. See the proposal for reasoning.