Update main.rs

This commit is contained in:
Elias Stepanik 2025-03-24 00:36:23 +01:00 committed by GitHub
parent d7ce852b23
commit 16e4f66f78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,21 +68,19 @@ fn register_platform_plugins(app: &mut App) {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{ {
info!("Adding macOS-specific plugins"); info!("Adding macOS-specific plugins");
app.add_plugins(DefaultPlugins) app.add_plugins(DefaultPlugins.set(WindowPlugin {
.set(WindowPlugin {
primary_window: Some(Window { primary_window: Some(Window {
title: crate::TITLE.to_string(), // Window title title: crate::TITLE.to_string(), // Window title
resolution: crate::RESOLUTION.into(), // Initial resolution (width x height) resolution: crate::RESOLUTION.into(), // Initial resolution (width x height)
resizable: crate::RESIZABLE, // Allow resizing resizable: crate::RESIZABLE, // Allow resizing
decorations: crate::DECORATIONS, // Enable window decorations decorations: crate::DECORATIONS, // Enable window decorations
transparent: crate::TRANSPARENT, // Opaque background transparent: crate::TRANSPARENT, // Opaque background
present_mode: crate::PRESENT_MODE, // VSync mode present_mode: crate::PRESENT_MODE, // VSync mode
..default() ..default() }),
}),
..default() ..default()
}); }));
} }
} }
fn should_display_inspector(inspector_visible: Res<InspectorVisible>) -> bool { fn should_display_inspector(inspector_visible: Res<InspectorVisible>) -> bool {
inspector_visible.0 inspector_visible.0
} }