Skip to content
Permalink
Browse files

Fix simpleservo build

  • Loading branch information
ferjm committed Nov 19, 2019
1 parent ca1a2e0 commit 6dcdfefd727aec1ae770a0a9e59f2e196906176d
Showing with 5 additions and 5 deletions.
  1. +5 −5 ports/libsimpleservo/capi/src/lib.rs
@@ -17,7 +17,7 @@ use env_logger;
use log::LevelFilter;
use simpleservo::{self, gl_glue, ServoGlue, SERVO};
use simpleservo::{
Coordinates, EventLoopWaker, HostTrait, InitOptions, MediaSessionEvent, MouseButton,
Coordinates, EventLoopWaker, HostTrait, InitOptions, MouseButton,
VRInitOptions,
};
use std::ffi::{CStr, CString};
@@ -716,16 +716,16 @@ impl HostTrait for HostCallbacks {
fn on_media_session_metadata(
&self,
title: String,
artist: Option<String>,
album: Option<String>,
artist: String,
album: String,
) {
debug!(
"on_media_session_metadata ({:?} {:?} {:?})",
title, artist, album
);
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 album = CString::new(album.unwrap_or(String::new())).expect("Can't create string");
let artist = CString::new(artist).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());
}

0 comments on commit 6dcdfef

Please sign in to comment.
You can’t perform that action at this time.