hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)
* hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
This commit is contained in:
parent
fbda5e9ec9
commit
7791cc8c2e
17 changed files with 104 additions and 100 deletions
|
@ -29,7 +29,11 @@ namespace Service {
|
|||
|
||||
namespace FileSystem {
|
||||
class FileSystemController;
|
||||
} // namespace FileSystem
|
||||
}
|
||||
|
||||
namespace NVFlinger {
|
||||
class NVFlinger;
|
||||
}
|
||||
|
||||
namespace SM {
|
||||
class ServiceManager;
|
||||
|
@ -181,10 +185,17 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
/// Initialize ServiceManager
|
||||
void Init(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system);
|
||||
/**
|
||||
* The purpose of this class is to own any objects that need to be shared across the other service
|
||||
* implementations. Will be torn down when the global system instance is shutdown.
|
||||
*/
|
||||
class Services final {
|
||||
public:
|
||||
explicit Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system);
|
||||
~Services();
|
||||
|
||||
/// Shutdown ServiceManager
|
||||
void Shutdown();
|
||||
private:
|
||||
std::unique_ptr<NVFlinger::NVFlinger> nv_flinger;
|
||||
};
|
||||
|
||||
} // namespace Service
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue