diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index 15bc29e908a6..e7f4980e94ac 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -252,10 +252,6 @@ Error PCKPacker::flush(bool p_verbose) { } } - if (p_verbose) { - printf("\n"); - } - file.unref(); memdelete_arr(buf); diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 2166d12d31fd..186c323bf743 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -1825,7 +1825,6 @@ RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const T } if (p_format.usage_bits & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT && !(flags & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)) { - printf("vkformat: %x\n", image_create_info.format); ERR_FAIL_V_MSG(RID(), "Format " + format_text + " does not support usage as depth-stencil attachment."); } diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index d3cceee1a392..cf88e4247229 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -261,11 +261,12 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) { VariantWriter::write_to_string(ED_GET_SHORTCUT("editor/stop_running_project"), shortcut); OS::get_singleton()->set_environment("__GODOT_EDITOR_STOP_SHORTCUT__", shortcut); - printf("Running: %s", exec.utf8().get_data()); - for (const String &E : args) { - printf(" %s", E.utf8().get_data()); - }; - printf("\n"); + if (OS::get_singleton()->is_stdout_verbose()) { + print_line(vformat("Running: %s", exec)); + for (const String &E : args) { + print_line(" %s", E); + } + } int instances = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_instances", 1); for (int i = 0; i < instances; i++) { diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 0bde6f62ed53..e6523e3d098d 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -203,7 +203,7 @@ Ref ResourceFormatDDS::load(const String &p_path, const String &p_orig } else if (format_flags & DDPF_INDEXED && format_rgb_bits == 8) { dds_format = DDS_BGR565; } else { - printf("unrecognized fourcc %x format_flags: %x - rgbbits %i - red_mask %x green mask %x blue mask %x alpha mask %x\n", format_fourcc, format_flags, format_rgb_bits, format_red_mask, format_green_mask, format_blue_mask, format_alpha_mask); + //printf("unrecognized fourcc %x format_flags: %x - rgbbits %i - red_mask %x green mask %x blue mask %x alpha mask %x\n", format_fourcc, format_flags, format_rgb_bits, format_red_mask, format_green_mask, format_blue_mask, format_alpha_mask); ERR_FAIL_V_MSG(Ref(), "Unrecognized or unsupported color layout in DDS '" + p_path + "'."); } diff --git a/platform/ios/godot_ios.mm b/platform/ios/godot_ios.mm index dc6f7c82bdee..b01e339211fc 100644 --- a/platform/ios/godot_ios.mm +++ b/platform/ios/godot_ios.mm @@ -83,14 +83,9 @@ int ios_main(int argc, char **argv) { char path[512]; memcpy(path, argv[0], len > sizeof(path) ? sizeof(path) : len); path[len] = 0; - printf("Path: %s\n", path); chdir(path); } - printf("godot_ios %s\n", argv[0]); - char cwd[512]; - getcwd(cwd, sizeof(cwd)); - printf("cwd %s\n", cwd); os = new OS_IOS(); // We must override main when testing is enabled @@ -104,10 +99,7 @@ int ios_main(int argc, char **argv) { argc = add_path(argc, fargv); argc = add_cmdline(argc, fargv); - printf("os created\n"); - Error err = Main::setup(fargv[0], argc - 1, &fargv[1], false); - printf("setup %i\n", err); if (err == ERR_HELP) { // Returned by --help and --version, so success. return 0; @@ -121,7 +113,6 @@ int ios_main(int argc, char **argv) { } void ios_finish() { - printf("ios_finish\n"); Main::cleanup(); delete os; } diff --git a/platform/ios/godot_view.mm b/platform/ios/godot_view.mm index 67e47092d8a6..ff04ea98385b 100644 --- a/platform/ios/godot_view.mm +++ b/platform/ios/godot_view.mm @@ -173,7 +173,7 @@ static const float earth_gravity = 9.80665; self.isActive = NO; - printf("******** stop animation!\n"); + print_verbose("Stop animation!"); if (self.useCADisplayLink) { [self.displayLink invalidate]; @@ -193,7 +193,7 @@ static const float earth_gravity = 9.80665; self.isActive = YES; - printf("start animation!\n"); + print_verbose("Start animation!"); if (self.useCADisplayLink) { self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawView)]; @@ -213,7 +213,7 @@ static const float earth_gravity = 9.80665; - (void)drawView { if (!self.isActive) { - printf("draw view not active!\n"); + print_verbose("Draw view not active!"); return; } diff --git a/platform/ios/ios.mm b/platform/ios/ios.mm index d240891a5cfe..1065f5fd2a4e 100644 --- a/platform/ios/ios.mm +++ b/platform/ios/ios.mm @@ -173,7 +173,7 @@ String iOS::get_rate_url(int p_app_id) const { String ret = app_url_path.replace("APP_ID", String::num(p_app_id)); - printf("returning rate url %s\n", ret.utf8().get_data()); + print_verbose(vformat("Returning rate url %s", ret)); return ret; } diff --git a/platform/ios/joypad_ios.mm b/platform/ios/joypad_ios.mm index 9194b09ef601..421c82dfc4cc 100644 --- a/platform/ios/joypad_ios.mm +++ b/platform/ios/joypad_ios.mm @@ -150,7 +150,7 @@ void JoypadIOS::start_processing() { int joy_id = Input::get_singleton()->get_unused_joy_id(); if (joy_id == -1) { - printf("Couldn't retrieve new joy id\n"); + print_verbose("Couldn't retrieve new joy ID."); return; } @@ -174,12 +174,12 @@ void JoypadIOS::start_processing() { GCController *controller = (GCController *)notification.object; if (!controller) { - printf("Couldn't retrieve new controller\n"); + print_verbose("Couldn't retrieve new controller."); return; } if ([[self.connectedJoypads allKeysForObject:controller] count] > 0) { - printf("Controller is already registered\n"); + print_verbose("Controller is already registered."); } else if (!self.isProcessing) { [self.joypadsQueue addObject:controller]; } else { diff --git a/platform/ios/main.m b/platform/ios/main.m index 9ccc420c7332..33b1034d9889 100644 --- a/platform/ios/main.m +++ b/platform/ios/main.m @@ -42,15 +42,12 @@ int main(int argc, char *argv[]) { setenv("MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE", "1", 1); #endif - printf("*********** main.m\n"); gargc = argc; gargv = argv; - printf("running app main\n"); @autoreleasepool { NSString *className = NSStringFromClass([GodotApplicalitionDelegate class]); UIApplicationMain(argc, argv, nil, className); } - printf("main done\n"); return 0; } diff --git a/platform/ios/os_ios.mm b/platform/ios/os_ios.mm index 4d2dd3c52c71..b2f72c310fcb 100644 --- a/platform/ios/os_ios.mm +++ b/platform/ios/os_ios.mm @@ -302,7 +302,7 @@ Error OS_IOS::shell_open(String p_uri) { return ERR_CANT_OPEN; } - printf("opening url %s\n", p_uri.utf8().get_data()); + print_verbose(vformat("Opening URL %s", p_uri)); [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; diff --git a/platform/ios/view_controller.mm b/platform/ios/view_controller.mm index a5aba201d734..8709252623e0 100644 --- a/platform/ios/view_controller.mm +++ b/platform/ios/view_controller.mm @@ -150,7 +150,7 @@ - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; - printf("*********** did receive memory warning!\n"); + print_verbose("Did receive memory warning!"); } - (void)viewDidLoad { @@ -165,11 +165,11 @@ } - (void)observeKeyboard { - printf("******** setting up keyboard input view\n"); + print_verbose("Setting up keyboard input view."); self.keyboardView = [GodotKeyboardInputView new]; [self.view addSubview:self.keyboardView]; - printf("******** adding observer for keyboard show/hide\n"); + print_verbose("Adding observer for keyboard show/hide."); [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardOnScreen:) diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index e5f278cc1931..834337053369 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -605,7 +605,7 @@ String DisplayServerX11::_clipboard_get_impl(Atom p_source, Window x11_window, A success = true; } } else { - printf("Failed to get selection data chunk.\n"); + print_verbose("Failed to get selection data chunk."); done = true; } @@ -632,7 +632,7 @@ String DisplayServerX11::_clipboard_get_impl(Atom p_source, Window x11_window, A if (result == Success) { ret.parse_utf8((const char *)data); } else { - printf("Failed to get selection data.\n"); + print_verbose("Failed to get selection data."); } if (data) { @@ -3343,7 +3343,7 @@ Atom DisplayServerX11::_process_selection_request_target(Atom p_target, Window p return p_property; } else { char *target_name = XGetAtomName(x11_display, p_target); - printf("Target '%s' not supported.\n", target_name); + print_verbose(vformat("Target '%s' not supported.", target_name)); if (target_name) { XFree(target_name); } diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp index 3bbd0a0b5ef9..617a53f0a3d0 100644 --- a/scene/resources/polygon_path_finder.cpp +++ b/scene/resources/polygon_path_finder.cpp @@ -303,7 +303,7 @@ Vector PolygonPathFinder::find_path(const Vector2 &p_from, const Vector while (true) { if (open_list.size() == 0) { - printf("open list empty\n"); + print_verbose("Open list empty."); break; } //check open list