Skip to content

Commit 628e113

Browse files
committed
Debug prints.
1 parent 83e3108 commit 628e113

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

crates/bevy_winit/src/state.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ impl<T: Event> ApplicationHandler<T> for WinitAppRunnerState<T> {
437437
{
438438
// Have the startup behavior run in about_to_wait, which prevents issues with
439439
// invisible window creation. https://github.com/bevyengine/bevy/issues/18027
440+
println!(
441+
"WindowEvent::RedrawRequested self.startup_forced_updates = {}",
442+
self.startup_forced_updates
443+
);
440444
if self.startup_forced_updates == 0 {
441445
self.redraw_requested = true;
442446
self.redraw_requested(_event_loop);
@@ -491,6 +495,11 @@ impl<T: Event> ApplicationHandler<T> for WinitAppRunnerState<T> {
491495
{
492496
let winit_windows = self.world().non_send_resource::<WinitWindows>();
493497
let headless = winit_windows.windows.is_empty();
498+
println!(
499+
"about_to_wait self.startup_forced_updates = {}, headless = {headless}",
500+
self.startup_forced_updates
501+
);
502+
494503
if self.startup_forced_updates > 0 || headless {
495504
self.redraw_requested(event_loop);
496505
}

examples/window/window_settings.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ fn main() {
5757
}
5858

5959
fn make_visible(mut window: Single<&mut Window>, frames: Res<FrameCount>) {
60+
println!("make_visible frames = {}", frames.0);
6061
// The delay may be different for your app or system.
6162
if frames.0 == 3 {
63+
println!("make_visible setting window.visible = true");
64+
6265
// At this point the gpu is ready to show the app so we can make the window visible.
6366
// Alternatively, you could toggle the visibility in Startup.
6467
// It will work, but it will have one white frame before it starts rendering

test.txt

2.62 MB
Binary file not shown.

0 commit comments

Comments
 (0)