mirror of https://github.com/ndarilek/tts-rs.git
Document the fact that we only need an NSRunLoop in the example because there isn't one already.
This commit is contained in:
parent
6788277a4d
commit
c5524113ff
|
@ -61,6 +61,8 @@ fn main() -> Result<(), Error> {
|
||||||
}
|
}
|
||||||
tts.speak("Goodbye.", false)?;
|
tts.speak("Goodbye.", false)?;
|
||||||
let mut _input = String::new();
|
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")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
let run_loop: id = unsafe { NSRunLoop::currentRunLoop() };
|
let run_loop: id = unsafe { NSRunLoop::currentRunLoop() };
|
||||||
|
|
Loading…
Reference in New Issue