added a check for external overlays, anything like overwolf, OBS and the such will instantly crash the engine with error "ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)] loader_get_json: Failed to open JSON file" so i've put a simple environment variable to skip external overlays in the vulkan initialisation
This commit is contained in:
parent
383b17b41f
commit
b02f629bd3
1 changed files with 11 additions and 0 deletions
|
|
@ -880,13 +880,24 @@ impl Renderer {
|
||||||
self.surface.configure(&self.device, &self.config);
|
self.surface.configure(&self.device, &self.config);
|
||||||
self.eye.resize(width, height);
|
self.eye.resize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn set_skybox(&mut self, skybox: SimpleTexture) {
|
pub fn set_skybox(&mut self, skybox: SimpleTexture) {
|
||||||
self.eye.skybox(&self.device, skybox);
|
self.eye.skybox(&self.device, skybox);
|
||||||
}
|
}
|
||||||
pub async fn new(window: &Arc<Window>) -> anyhow::Result<Self> {
|
pub async fn new(window: &Arc<Window>) -> anyhow::Result<Self> {
|
||||||
|
static SKIP_EXTERNAL_OVERLAYS : bool = true; // use a config file or something to allow this to be toggled
|
||||||
|
|
||||||
let bounds = window.inner_size();
|
let bounds = window.inner_size();
|
||||||
let width = bounds.width;
|
let width = bounds.width;
|
||||||
let height = bounds.height;
|
let height = bounds.height;
|
||||||
|
|
||||||
|
if(SKIP_EXTERNAL_OVERLAYS) {
|
||||||
|
unsafe { // currently will crash on most Windows systems because wGPU in its infinite
|
||||||
|
// wisdom tries to attach overlays from closed or non-existent programs
|
||||||
|
std::env::set_var("VK_LOADER_LAYERS_DISABLE", "~implicit~");
|
||||||
|
}
|
||||||
|
}
|
||||||
// The instance is a handle to our GPU
|
// The instance is a handle to our GPU
|
||||||
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
|
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
|
||||||
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue