Skip to content

Commit

Permalink
updating for latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Apr 26, 2022
1 parent 6afe2a3 commit 9613157
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/debug_asset_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Plugin for DebugAssetServerPlugin {
.thread_name("Debug Asset Server IO Task Pool".to_string())
.build(),
))
.insert_resource(AssetServerSettings {
.insert_setup_resource(AssetServerSettings {
asset_folder: "crates".to_string(),
watch_for_changes: true,
})
Expand Down
4 changes: 1 addition & 3 deletions crates/bevy_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,7 @@ pub fn winit_runner_with(mut app: App) {
app.world
.insert_non_send_resource(event_loop.create_proxy());

let return_from_run = app
.consume_setup_resource::<WinitSettings>()
.map_or(false, |config| config.return_from_run);
let return_from_run = app.world.resource::<WinitSettings>().return_from_run;
trace!("Entering winit event loop");

let event_handler = move |event: Event<()>,
Expand Down
4 changes: 2 additions & 2 deletions examples/app/return_after_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use bevy::{prelude::*, winit::WinitSettings};
fn main() {
println!("Running first App.");
App::new()
.insert_setup_resource(WinitSettings {
.insert_resource(WinitSettings {
return_from_run: true,
..default()
})
Expand All @@ -13,7 +13,7 @@ fn main() {
.run();
println!("Running another App.");
App::new()
.insert_setup_resource(WinitSettings {
.insert_resource(WinitSettings {
return_from_run: true,
..default()
})
Expand Down
2 changes: 1 addition & 1 deletion examples/asset/hot_asset_reloading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bevy::{asset::AssetServerSettings, prelude::*};
fn main() {
App::new()
// Tell the asset server to watch for asset changes on disk:
.insert_resource(AssetServerSettings {
.insert_setup_resource(AssetServerSettings {
watch_for_changes: true,
..default()
})
Expand Down
2 changes: 1 addition & 1 deletion examples/stress_tests/many_lights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rand::{thread_rng, Rng};

fn main() {
App::new()
.insert_resource(WindowDescriptor {
.insert_setup_resource(WindowSetupDescriptor {
width: 1024.0,
height: 768.0,
title: "many_lights".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions examples/tools/scene_viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ Controls:
color: Color::WHITE,
brightness: 1.0 / 5.0f32,
})
.insert_resource(AssetServerSettings {
.insert_setup_resource(AssetServerSettings {
asset_folder: std::env::var("CARGO_MANIFEST_DIR").unwrap_or_else(|_| ".".to_string()),
watch_for_changes: true,
})
.insert_resource(WindowDescriptor {
.insert_setup_resource(WindowSetupDescriptor {
title: "bevy scene viewer".to_string(),
..default()
})
Expand Down
2 changes: 1 addition & 1 deletion examples/window/low_power.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn main() {
..default()
})
// Turn off vsync to maximize CPU/GPU usage
.insert_resource(WindowDescriptor {
.insert_setup_resource(WindowSetupDescriptor {
present_mode: PresentMode::Immediate,
..default()
})
Expand Down
2 changes: 1 addition & 1 deletion examples/window/transparent_window.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// An example of how to display a window in transparent mode
/// [Documentation & Platform support.](https://docs.rs/bevy/latest/bevy/prelude/struct.WindowDescriptor.html#structfield.transparent)
/// [Documentation & Platform support.](https://docs.rs/bevy/latest/bevy/prelude/struct.WindowSetupDescriptor.html#structfield.transparent)
use bevy::{prelude::*, window::WindowSetupDescriptor};

fn main() {
Expand Down

0 comments on commit 9613157

Please sign in to comment.