Use verbose prints when registering cameras in CameraServer

This prevents lines from being printed every time the editor or project
starts in the editor Output log.

(cherry picked from commit b83e0b6447)
This commit is contained in:
Hugo Locurcio 2022-09-02 23:25:19 +02:00 committed by Rémi Verschelde
parent 0511f48c49
commit d3c9817300

View file

@ -104,10 +104,7 @@ void CameraServer::add_feed(const Ref<CameraFeed> &p_feed) {
// add our feed
feeds.push_back(p_feed);
// record for debugging
#ifdef DEBUG_ENABLED
print_line("Registered camera " + p_feed->get_name() + " with id " + itos(p_feed->get_id()) + " position " + itos(p_feed->get_position()) + " at index " + itos(feeds.size() - 1));
#endif
print_verbose("CameraServer: Registered camera " + p_feed->get_name() + " with ID " + itos(p_feed->get_id()) + " and position " + itos(p_feed->get_position()) + " at index " + itos(feeds.size() - 1));
// let whomever is interested know
emit_signal("camera_feed_added", p_feed->get_id());
@ -118,10 +115,7 @@ void CameraServer::remove_feed(const Ref<CameraFeed> &p_feed) {
if (feeds[i] == p_feed) {
int feed_id = p_feed->get_id();
// record for debugging
#ifdef DEBUG_ENABLED
print_line("Removed camera " + p_feed->get_name() + " with id " + itos(feed_id) + " position " + itos(p_feed->get_position()));
#endif
print_verbose("CameraServer: Removed camera " + p_feed->get_name() + " with ID " + itos(feed_id) + " and position " + itos(p_feed->get_position()));
// remove it from our array, if this results in our feed being unreferenced it will be destroyed
feeds.remove(i);