1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-17 07:29:38 +00:00

Document the fact that we only need an NSRunLoop in the example because there isn't one already.

This commit is contained in:
Nolan Darilek 2020-09-23 10:33:30 -05:00
parent 6788277a4d
commit c5524113ff

View File

@ -61,6 +61,8 @@ fn main() -> Result<(), Error> {
}
tts.speak("Goodbye.", false)?;
let mut _input = String::new();
// The below is only needed to make the example run on MacOS because there is no NSRunLoop in this context.
// It shouldn't be needed in an app or game that almost certainly has one already.
#[cfg(target_os = "macos")]
{
let run_loop: id = unsafe { NSRunLoop::currentRunLoop() };