Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dev/src/host_apple_macos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ namespace olc::host {
if (!this->OnSystemThreadStart())
{
// PGE->OnContextStart() failed, or user aborted OnUserCreate()
return;
StopSystem();

}

// Main system loop
Expand Down Expand Up @@ -346,6 +347,9 @@ namespace olc::host {

bool Host_Apple_MacOS::StopSystem()
{
// Clear any pending tasks/messages on the main thread
bSkipFrame = ExecutePendingMainThreadTasks();

dispatch_sync(dispatch_get_main_queue(), ^{
// clean up and close application
if (pMacOSOpenGLRenderer)
Expand Down
6 changes: 5 additions & 1 deletion olcPixelGameEngine3.h
Original file line number Diff line number Diff line change
Expand Up @@ -11822,7 +11822,8 @@ namespace olc::host {
if (!this->OnSystemThreadStart())
{
// PGE->OnContextStart() failed, or user aborted OnUserCreate()
return;
StopSystem();

}

// Main system loop
Expand Down Expand Up @@ -11858,6 +11859,9 @@ namespace olc::host {

bool Host_Apple_MacOS::StopSystem()
{
// Clear any pending tasks/messages on the main thread
bSkipFrame = ExecutePendingMainThreadTasks();

dispatch_sync(dispatch_get_main_queue(), ^{
// clean up and close application
if (pMacOSOpenGLRenderer)
Expand Down
Loading