forked from MightyPork/crsn
start program without spawning thread so screen works on mac. improve mouse demo
This commit is contained in:
@@ -48,13 +48,15 @@ impl RunThread {
|
||||
self.info.cycle_time = cycle_time;
|
||||
}
|
||||
|
||||
pub fn start(self) -> JoinHandle<()> {
|
||||
/// Spawn as a thread
|
||||
pub fn spawn(self) -> JoinHandle<()> {
|
||||
std::thread::spawn(move || {
|
||||
self.run();
|
||||
})
|
||||
}
|
||||
|
||||
fn run(mut self) {
|
||||
/// Start synchronously
|
||||
pub fn run(mut self) {
|
||||
'run: loop {
|
||||
match self.eval_op() {
|
||||
Ok(EvalRes { cycles, advance }) => {
|
||||
|
||||
Reference in New Issue
Block a user