Windows fix

This commit is contained in:
Rémi BERTHO 2023-11-09 23:15:32 +01:00
parent 68860aad80
commit 1681188214
Signed by: dalan
GPG key ID: EE3B917931C07B64
7 changed files with 19 additions and 123 deletions

View file

@ -14,7 +14,7 @@ use wry::{
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
},
webview::WebViewBuilder,
webview::{WebContext, WebViewBuilder},
};
#[derive(RustEmbed)]
@ -85,8 +85,12 @@ fn main() -> Result<()> {
.with_title("Simple panorama viewer")
.with_maximized(true)
.build(&event_loop)?;
let data_dir = directories::ProjectDirs::from("fr", "dalan", "SimplePanoramaViwer").unwrap();
let _webview = WebViewBuilder::new(window)?
.with_url("http://127.0.0.1:62371/index.html")?
.with_web_context(&mut WebContext::new(Some(
data_dir.cache_dir().to_path_buf(),
)))
.build()?;
info!("Event loop");