desktop: URL-decode the window title (fix #15454)
This commit is contained in:
parent
4ae9f32732
commit
4927baf290
|
@ -4392,6 +4392,7 @@ dependencies = [
|
||||||
"tracing-tracy",
|
"tracing-tracy",
|
||||||
"unic-langid",
|
"unic-langid",
|
||||||
"url",
|
"url",
|
||||||
|
"urlencoding",
|
||||||
"vergen",
|
"vergen",
|
||||||
"webbrowser",
|
"webbrowser",
|
||||||
"wgpu",
|
"wgpu",
|
||||||
|
|
|
@ -48,6 +48,7 @@ async-net = "2.0.0"
|
||||||
async-channel = "2.2.0"
|
async-channel = "2.2.0"
|
||||||
toml_edit = { version = "0.22.6", features = ["parse"] }
|
toml_edit = { version = "0.22.6", features = ["parse"] }
|
||||||
gilrs = "0.10"
|
gilrs = "0.10"
|
||||||
|
urlencoding = "2.1.3"
|
||||||
|
|
||||||
# Deliberately held back to match tracy client used by profiling crate
|
# Deliberately held back to match tracy client used by profiling crate
|
||||||
tracing-tracy = { version = "=0.10.4", optional = true }
|
tracing-tracy = { version = "=0.10.4", optional = true }
|
||||||
|
|
|
@ -19,12 +19,14 @@ use ruffle_render::backend::RenderBackend;
|
||||||
use ruffle_render::quality::StageQuality;
|
use ruffle_render::quality::StageQuality;
|
||||||
use ruffle_render_wgpu::backend::WgpuRenderBackend;
|
use ruffle_render_wgpu::backend::WgpuRenderBackend;
|
||||||
use ruffle_render_wgpu::descriptors::Descriptors;
|
use ruffle_render_wgpu::descriptors::Descriptors;
|
||||||
|
use std::borrow::Cow;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::{Arc, Mutex, MutexGuard};
|
use std::sync::{Arc, Mutex, MutexGuard};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
use urlencoding::decode;
|
||||||
use winit::event_loop::EventLoopProxy;
|
use winit::event_loop::EventLoopProxy;
|
||||||
use winit::window::Window;
|
use winit::window::Window;
|
||||||
|
|
||||||
|
@ -192,7 +194,9 @@ impl ActivePlayer {
|
||||||
.unwrap_or_else(|| movie_url.as_str())
|
.unwrap_or_else(|| movie_url.as_str())
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
window.set_title(&format!("Ruffle - {name}"));
|
let readable_name = decode(&name).unwrap_or(Cow::Borrowed(&name));
|
||||||
|
|
||||||
|
window.set_title(&format!("Ruffle - {readable_name}"));
|
||||||
|
|
||||||
SWF_INFO.with(|i| *i.borrow_mut() = Some(name.clone()));
|
SWF_INFO.with(|i| *i.borrow_mut() = Some(name.clone()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue