Skip to content

Commit

Permalink
Make app name based on CARGO_BIN_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
SafariMonkey committed Dec 10, 2023
1 parent 18506d3 commit 1c22dbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/graphics/d3d12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn initialize_xr_graphics(

let xr_instance = xr_entry.create_instance(
&xr::ApplicationInfo {
application_name: "Ambient",
application_name: option_env!("CARGO_BIN_NAME").unwrap_or("bevy"),
..Default::default()
},
&enabled_extensions,
Expand Down Expand Up @@ -100,7 +100,7 @@ pub fn initialize_xr_graphics(
}

let instance_descriptor = &wgpu_hal::InstanceDescriptor {
name: "Ambient",
name: option_env!("CARGO_BIN_NAME").unwrap_or("bevy"),
dx12_shader_compiler: wgpu::util::dx12_shader_compiler_from_env().unwrap_or_default(),
flags: wgpu_hal::InstanceFlags::from_bits_truncate(
wgpu_types::InstanceFlags::from_build_config()
Expand Down
4 changes: 2 additions & 2 deletions src/graphics/vulkan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn initialize_xr_graphics(

let xr_instance = xr_entry.create_instance(
&xr::ApplicationInfo {
application_name: "Ambient",
application_name: option_env!("CARGO_BIN_NAME").unwrap_or("bevy"),
..Default::default()
},
&enabled_extensions,
Expand Down Expand Up @@ -126,7 +126,7 @@ pub fn initialize_xr_graphics(
let vk_instance = unsafe {
let extensions_cchar: Vec<_> = extensions.iter().map(|s| s.as_ptr()).collect();

let app_name = CString::new("Ambient")?;
let app_name = CString::new(option_env!("CARGO_BIN_NAME").unwrap_or("bevy"))?;
let vk_app_info = vk::ApplicationInfo::builder()
.application_name(&app_name)
.application_version(1)
Expand Down

0 comments on commit 1c22dbb

Please sign in to comment.