-
-
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
Don't invoke adb with no runnable Android preset #87823
Conversation
editor/export/editor_export.cpp
Outdated
ADD_SIGNAL(MethodInfo(_export_presets_updated)); | ||
ADD_SIGNAL(MethodInfo(_export_presets_changed)); |
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.
The names are quite similar, it's a bit hard to know at a glance which one means what.
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.
I wasn't sure how to name the new signal. It could be export_preset_list_changed
, but that doesn't cover runnable change.
Would it be enough if I added a comment somewhere?
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.
Can we just use _export_presets_updated
to signal both an addition to the list and an update to the runnable
state?
I don't think we need to introduce a new signal.
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.
I didn't want to change what this signal does, but sure.
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.
Wait no, the reason why I didn't use the old signal is that it's emitted too often for my purposes. There is no reason to run the update code on unrelated changes.
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.
Wait no, the reason why I didn't use the old signal is that it's emitted too often for my purposes. There is no reason to run the update code on unrelated changes.
I think it may be a compromise worth making; after all, it'll end up being called an order of magnitude less than it's being invoked in the current codebase.
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.
Or you could create a new signal specifically for the runnable
update.
The same is true for iOS, so it should have the same change as well. |
editor/export/editor_export.cpp
Outdated
ADD_SIGNAL(MethodInfo(_export_presets_updated)); | ||
ADD_SIGNAL(MethodInfo(_export_presets_changed)); |
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.
Can we just use _export_presets_updated
to signal both an addition to the list and an update to the runnable
state?
I don't think we need to introduce a new signal.
Did similar change to iOS, but I didn't test it. |
Renamed the signal to |
Thanks! |
Android export plugin will periodically call adb.exe to check for available devices. It does this constantly while the editor is running, regardless if the project is targeted for Android or not. Performance implications aside, this check will sometimes fail and spit an error that reminds you that it runs in the background.
This PR tweaks this behavior. The adb will be called only if the project has an export preset for Android and it's marked runnable (AFAIK it's a requirement to run something on a device). I added a new signal that gets emitted when adding/removing preset and toggling Runnable.