Skip to content

Commit

Permalink
fix(app): fix pause dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Aug 12, 2024
1 parent 17e1134 commit f2a34a2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/app/app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ didFailToContinueUserActivityWithType: (NSString*) userActivityType
}

- (void) applicationWillTerminate: (UIApplication*) application {
// TODO(@jwerle): what should we do here?
dispatch_async(queue, ^{
// TODO(@jwerle): what should we do here?
self.app->stop();
});
}

- (void) applicationDidBecomeActive: (UIApplication*) application {
Expand Down Expand Up @@ -863,7 +866,9 @@ namespace SSC {
if (this->core != nullptr && !this->paused) {
this->paused = true;
this->windowManager.emit("applicationpause");
this->core->pause();
this->dispatch([this]() {
this->core->pause();
});
}
}

Expand All @@ -874,9 +879,7 @@ namespace SSC {

this->stopped = true;
this->windowManager.emit("applicationstop");
this->dispatch([this]() {
this->pause();
});
this->pause();

SSC::applicationInstance = nullptr;

Expand Down

0 comments on commit f2a34a2

Please sign in to comment.