Skip to content

Commit

Permalink
[XB1] Release DX extended resources before Cobalt exit
Browse files Browse the repository at this point in the history
b/299726093

Change-Id: Ic47bbf2f454c98a79a9203d0d040ab7a6c2dbdc2
  • Loading branch information
victorpasoshnikov committed Sep 29, 2023
1 parent 34a52ef commit c922d06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions starboard/shared/starboard/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ bool Application::DispatchAndDelete(Application::Event* event) {
}

bool Application::HandleEventAndUpdateState(Application::Event* event) {
// Don't accept any events in kStateStopped state
if (state_ == kStateStopped)
return true;

Check warning on line 415 in starboard/shared/starboard/application.cc

View check run for this annotation

Codecov / codecov/patch

starboard/shared/starboard/application.cc#L415

Added line #L415 was not covered by tests

// Ensure the event is deleted unless it is released.
scoped_ptr<Event> scoped_event(event);

Expand Down
6 changes: 3 additions & 3 deletions starboard/shared/uwp/application_uwp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1029,8 +1029,9 @@ void ApplicationUwp::Inject(Application::Event* event) {
RunInMainThreadAsync([this, event]() {
bool result = DispatchAndDelete(event);
if (!result) {
NetLogFlushThenClose();
CoreApplication::Exit();
// Release ExtendedResourcesManager. This lets
// ApplicationUwp::InternalMain() to return
ExtendedResourcesManager::GetInstance()->Quit();
}
});
}
Expand Down Expand Up @@ -1332,7 +1333,6 @@ int InternalMain() {
extended_resources_manager.Run();

NetLogFlushThenClose();
CoreApplication::Exit();

MFShutdown();
WSACleanup();
Expand Down

0 comments on commit c922d06

Please sign in to comment.