mirror of
https://github.com/servo/servo.git
synced 2025-06-10 01:23:13 +00:00
Fix simpleservo build
This commit is contained in:
parent
ca1a2e0525
commit
6dcdfefd72
1 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,7 @@ use env_logger;
|
||||||
use log::LevelFilter;
|
use log::LevelFilter;
|
||||||
use simpleservo::{self, gl_glue, ServoGlue, SERVO};
|
use simpleservo::{self, gl_glue, ServoGlue, SERVO};
|
||||||
use simpleservo::{
|
use simpleservo::{
|
||||||
Coordinates, EventLoopWaker, HostTrait, InitOptions, MediaSessionEvent, MouseButton,
|
Coordinates, EventLoopWaker, HostTrait, InitOptions, MouseButton,
|
||||||
VRInitOptions,
|
VRInitOptions,
|
||||||
};
|
};
|
||||||
use std::ffi::{CStr, CString};
|
use std::ffi::{CStr, CString};
|
||||||
|
@ -716,16 +716,16 @@ impl HostTrait for HostCallbacks {
|
||||||
fn on_media_session_metadata(
|
fn on_media_session_metadata(
|
||||||
&self,
|
&self,
|
||||||
title: String,
|
title: String,
|
||||||
artist: Option<String>,
|
artist: String,
|
||||||
album: Option<String>,
|
album: String,
|
||||||
) {
|
) {
|
||||||
debug!(
|
debug!(
|
||||||
"on_media_session_metadata ({:?} {:?} {:?})",
|
"on_media_session_metadata ({:?} {:?} {:?})",
|
||||||
title, artist, album
|
title, artist, album
|
||||||
);
|
);
|
||||||
let title = CString::new(title).expect("Can't create string");
|
let title = CString::new(title).expect("Can't create string");
|
||||||
let artist = CString::new(artist.unwrap_or(String::new())).expect("Can't create string");
|
let artist = CString::new(artist).expect("Can't create string");
|
||||||
let album = CString::new(album.unwrap_or(String::new())).expect("Can't create string");
|
let album = CString::new(album).expect("Can't create string");
|
||||||
(self.0.on_media_session_metadata)(title.as_ptr(), artist.as_ptr(), album.as_ptr());
|
(self.0.on_media_session_metadata)(title.as_ptr(), artist.as_ptr(), album.as_ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue