Adapt hwrunner to the changed API
authorunc0rr
Sun, 13 Nov 2022 08:45:10 +0100
changeset 15892 b3295f94e5e9
parent 15891 d52f5d8e75e6
child 15893 5b3beb90e1a6
Adapt hwrunner to the changed API
rust/hwrunner/src/main.rs
--- a/rust/hwrunner/src/main.rs	Sat Nov 12 21:12:14 2022 +0100
+++ b/rust/hwrunner/src/main.rs	Sun Nov 13 08:45:10 2022 +0100
@@ -11,7 +11,10 @@
 };
 use hedgewars_engine::instance::EngineInstance;
 use integral_geometry::Point;
-use std::error::Error;
+use std::{
+    error::Error,
+    path::Path,
+};
 use wgpu::{
     Adapter, BackendBit, Color, CommandEncoderDescriptor, Device, DeviceDescriptor, Features,
     LoadOp, Operations, PowerPreference, PresentMode, Queue, RenderPassColorAttachmentDescriptor,
@@ -193,7 +196,7 @@
 
     let mut context = HwRendererContext::new(&event_loop, dpi::LogicalSize::new(w, h), use_wgpu);
 
-    let mut engine = EngineInstance::new();
+    let mut engine = EngineInstance::new(Path::new("../../share/hedgewars/Data"));
     if !use_wgpu {
         engine.world.create_renderer(w as u16, h as u16);
     }