desktop: Add swf filename to window title (closes #318)

This commit is contained in:
Nathan Adams 2020-01-17 22:31:42 +01:00 committed by Mike Welsh
parent 93b06483c8
commit f747caf30c
1 changed files with 5 additions and 2 deletions

View File

@ -43,10 +43,13 @@ fn main() {
}
fn run_player(input_path: PathBuf) -> Result<(), Box<dyn std::error::Error>> {
let swf_data = std::fs::read(input_path)?;
let swf_data = std::fs::read(&input_path)?;
let event_loop = EventLoop::new();
let window_builder = WindowBuilder::new().with_title("Ruffle");
let window_builder = WindowBuilder::new().with_title(format!(
"Ruffle - {}",
input_path.file_name().unwrap_or_default().to_string_lossy()
));
let windowed_context = ContextBuilder::new()
.with_vsync(true)
.with_multisampling(4)